initial import
[vuplus_webkit] / Source / WebKit / chromium / public / WebRuntimeFeatures.h
1 /*
2  * Copyright (C) 2009 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
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
13  * distribution.
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.
17  *
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.
29  */
30
31 #ifndef WebRuntimeFeatures_h
32 #define WebRuntimeFeatures_h
33
34 #define HAS_WEBAUDIO_RUNTIMEFEATURES 1
35
36 #include "WebCommon.h"
37
38 namespace WebKit {
39
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 {
45 public:
46     WEBKIT_EXPORT static void enableDatabase(bool);
47     WEBKIT_EXPORT static bool isDatabaseEnabled();
48
49     WEBKIT_EXPORT static void enableLocalStorage(bool);
50     WEBKIT_EXPORT static bool isLocalStorageEnabled();
51
52     WEBKIT_EXPORT static void enableSessionStorage(bool);
53     WEBKIT_EXPORT static bool isSessionStorageEnabled();
54
55     WEBKIT_EXPORT static void enableMediaPlayer(bool);
56     WEBKIT_EXPORT static bool isMediaPlayerEnabled();
57
58     WEBKIT_EXPORT static void enableSockets(bool);
59     WEBKIT_EXPORT static bool isSocketsEnabled();
60
61     WEBKIT_EXPORT static void enableNotifications(bool);
62     WEBKIT_EXPORT static bool isNotificationsEnabled();
63
64     WEBKIT_EXPORT static void enableApplicationCache(bool);
65     WEBKIT_EXPORT static bool isApplicationCacheEnabled();
66     
67     WEBKIT_EXPORT static void enableDataTransferItems(bool);
68     WEBKIT_EXPORT static bool isDataTransferItemsEnabled();
69
70     WEBKIT_EXPORT static void enableGeolocation(bool);
71     WEBKIT_EXPORT static bool isGeolocationEnabled();
72
73     WEBKIT_EXPORT static void enableIndexedDatabase(bool);
74     WEBKIT_EXPORT static bool isIndexedDatabaseEnabled();
75
76     WEBKIT_EXPORT static void enableWebAudio(bool);
77     WEBKIT_EXPORT static bool isWebAudioEnabled();
78
79     WEBKIT_EXPORT static void enablePushState(bool);
80     WEBKIT_EXPORT static bool isPushStateEnabled(bool);
81
82     WEBKIT_EXPORT static void enableTouch(bool);
83     WEBKIT_EXPORT static bool isTouchEnabled();
84
85     WEBKIT_EXPORT static void enableDeviceMotion(bool);
86     WEBKIT_EXPORT static bool isDeviceMotionEnabled();
87
88     WEBKIT_EXPORT static void enableDeviceOrientation(bool);
89     WEBKIT_EXPORT static bool isDeviceOrientationEnabled();
90
91     WEBKIT_EXPORT static void enableSpeechInput(bool);
92     WEBKIT_EXPORT static bool isSpeechInputEnabled();
93
94     WEBKIT_EXPORT static void enableXHRResponseBlob(bool);
95     WEBKIT_EXPORT static bool isXHRResponseBlobEnabled();
96
97     WEBKIT_EXPORT static void enableFileSystem(bool);
98     WEBKIT_EXPORT static bool isFileSystemEnabled();
99     
100     WEBKIT_EXPORT static void enableJavaScriptI18NAPI(bool);
101     WEBKIT_EXPORT static bool isJavaScriptI18NAPIEnabled();
102
103     WEBKIT_EXPORT static void enableQuota(bool);
104     WEBKIT_EXPORT static bool isQuotaEnabled();
105
106     WEBKIT_EXPORT static void enableMediaStream(bool);
107     WEBKIT_EXPORT static bool isMediaStreamEnabled();
108
109     WEBKIT_EXPORT static void enableFullScreenAPI(bool);
110     WEBKIT_EXPORT static bool isFullScreenAPIEnabled();
111
112     WEBKIT_EXPORT static void enableMediaSource(bool);
113     WEBKIT_EXPORT static bool isMediaSourceEnabled();
114
115 private:
116     WebRuntimeFeatures();
117 };
118
119 } // namespace WebKit
120
121 #endif