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_EXPORT static void enableDatabase(bool);
47 WEBKIT_EXPORT static bool isDatabaseEnabled();
49 WEBKIT_EXPORT static void enableLocalStorage(bool);
50 WEBKIT_EXPORT static bool isLocalStorageEnabled();
52 WEBKIT_EXPORT static void enableSessionStorage(bool);
53 WEBKIT_EXPORT static bool isSessionStorageEnabled();
55 WEBKIT_EXPORT static void enableMediaPlayer(bool);
56 WEBKIT_EXPORT static bool isMediaPlayerEnabled();
58 WEBKIT_EXPORT static void enableSockets(bool);
59 WEBKIT_EXPORT static bool isSocketsEnabled();
61 WEBKIT_EXPORT static void enableNotifications(bool);
62 WEBKIT_EXPORT static bool isNotificationsEnabled();
64 WEBKIT_EXPORT static void enableApplicationCache(bool);
65 WEBKIT_EXPORT static bool isApplicationCacheEnabled();
67 WEBKIT_EXPORT static void enableDataTransferItems(bool);
68 WEBKIT_EXPORT static bool isDataTransferItemsEnabled();
70 WEBKIT_EXPORT static void enableGeolocation(bool);
71 WEBKIT_EXPORT static bool isGeolocationEnabled();
73 WEBKIT_EXPORT static void enableIndexedDatabase(bool);
74 WEBKIT_EXPORT static bool isIndexedDatabaseEnabled();
76 WEBKIT_EXPORT static void enableWebAudio(bool);
77 WEBKIT_EXPORT static bool isWebAudioEnabled();
79 WEBKIT_EXPORT static void enablePushState(bool);
80 WEBKIT_EXPORT static bool isPushStateEnabled(bool);
82 WEBKIT_EXPORT static void enableTouch(bool);
83 WEBKIT_EXPORT static bool isTouchEnabled();
85 WEBKIT_EXPORT static void enableDeviceMotion(bool);
86 WEBKIT_EXPORT static bool isDeviceMotionEnabled();
88 WEBKIT_EXPORT static void enableDeviceOrientation(bool);
89 WEBKIT_EXPORT static bool isDeviceOrientationEnabled();
91 WEBKIT_EXPORT static void enableSpeechInput(bool);
92 WEBKIT_EXPORT static bool isSpeechInputEnabled();
94 WEBKIT_EXPORT static void enableXHRResponseBlob(bool);
95 WEBKIT_EXPORT static bool isXHRResponseBlobEnabled();
97 WEBKIT_EXPORT static void enableFileSystem(bool);
98 WEBKIT_EXPORT static bool isFileSystemEnabled();
100 WEBKIT_EXPORT static void enableJavaScriptI18NAPI(bool);
101 WEBKIT_EXPORT static bool isJavaScriptI18NAPIEnabled();
103 WEBKIT_EXPORT static void enableQuota(bool);
104 WEBKIT_EXPORT static bool isQuotaEnabled();
106 WEBKIT_EXPORT static void enableMediaStream(bool);
107 WEBKIT_EXPORT static bool isMediaStreamEnabled();
109 WEBKIT_EXPORT static void enableFullScreenAPI(bool);
110 WEBKIT_EXPORT static bool isFullScreenAPIEnabled();
112 WEBKIT_EXPORT static void enableMediaSource(bool);
113 WEBKIT_EXPORT static bool isMediaSourceEnabled();
116 WebRuntimeFeatures();
119 } // namespace WebKit