2 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef WebRuntimeFeatures_h
32 #define WebRuntimeFeatures_h
34 #define HAS_WEBAUDIO_RUNTIMEFEATURES 1
36 #include "WebCommon.h"
40 // This class is used to enable runtime features of WebKit. It is unspecified
41 // whether a feature is enabled by default. In the future, a feature may be
42 // promoted from disabled by default to enabled by default once it reaches a
43 // certain level of maturity.
44 class WebRuntimeFeatures {
46 WEBKIT_API static void enableDatabase(bool);
47 WEBKIT_API static bool isDatabaseEnabled();
49 WEBKIT_API static void enableLocalStorage(bool);
50 WEBKIT_API static bool isLocalStorageEnabled();
52 WEBKIT_API static void enableSessionStorage(bool);
53 WEBKIT_API static bool isSessionStorageEnabled();
55 WEBKIT_API static void enableMediaPlayer(bool);
56 WEBKIT_API static bool isMediaPlayerEnabled();
58 WEBKIT_API static void enableSockets(bool);
59 WEBKIT_API static bool isSocketsEnabled();
61 WEBKIT_API static void enableNotifications(bool);
62 WEBKIT_API static bool isNotificationsEnabled();
64 WEBKIT_API static void enableApplicationCache(bool);
65 WEBKIT_API static bool isApplicationCacheEnabled();
67 WEBKIT_API static void enableGeolocation(bool);
68 WEBKIT_API static bool isGeolocationEnabled();
70 WEBKIT_API static void enableIndexedDatabase(bool);
71 WEBKIT_API static bool isIndexedDatabaseEnabled();
73 WEBKIT_API static void enableWebAudio(bool);
74 WEBKIT_API static bool isWebAudioEnabled();
76 WEBKIT_API static void enableWebGL(bool);
77 WEBKIT_API static bool isWebGLEnabled();
79 WEBKIT_API static void enablePushState(bool);
80 WEBKIT_API static bool isPushStateEnabled(bool);
82 WEBKIT_API static void enableTouch(bool);
83 WEBKIT_API static bool isTouchEnabled();
85 WEBKIT_API static void enableDeviceMotion(bool);
86 WEBKIT_API static bool isDeviceMotionEnabled();
88 WEBKIT_API static void enableDeviceOrientation(bool);
89 WEBKIT_API static bool isDeviceOrientationEnabled();
91 WEBKIT_API static void enableSpeechInput(bool);
92 WEBKIT_API static bool isSpeechInputEnabled();
94 WEBKIT_API static void enableXHRResponseBlob(bool);
95 WEBKIT_API static bool isXHRResponseBlobEnabled();
97 WEBKIT_API static void enableFileSystem(bool);
98 WEBKIT_API static bool isFileSystemEnabled();
100 WEBKIT_API static void enableJavaScriptI18NAPI(bool);
101 WEBKIT_API static bool isJavaScriptI18NAPIEnabled();
104 WebRuntimeFeatures();
107 } // namespace WebKit