Home | History | Annotate | Download | only in public
      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_API static void enableDatabase(bool);
     47     WEBKIT_API static bool isDatabaseEnabled();
     48 
     49     WEBKIT_API static void enableLocalStorage(bool);
     50     WEBKIT_API static bool isLocalStorageEnabled();
     51 
     52     WEBKIT_API static void enableSessionStorage(bool);
     53     WEBKIT_API static bool isSessionStorageEnabled();
     54 
     55     WEBKIT_API static void enableMediaPlayer(bool);
     56     WEBKIT_API static bool isMediaPlayerEnabled();
     57 
     58     WEBKIT_API static void enableSockets(bool);
     59     WEBKIT_API static bool isSocketsEnabled();
     60 
     61     WEBKIT_API static void enableNotifications(bool);
     62     WEBKIT_API static bool isNotificationsEnabled();
     63 
     64     WEBKIT_API static void enableApplicationCache(bool);
     65     WEBKIT_API static bool isApplicationCacheEnabled();
     66 
     67     WEBKIT_API static void enableDataTransferItems(bool);
     68     WEBKIT_API static bool isDataTransferItemsEnabled();
     69 
     70     WEBKIT_API static void enableGeolocation(bool);
     71     WEBKIT_API static bool isGeolocationEnabled();
     72 
     73     WEBKIT_API static void enableIndexedDatabase(bool);
     74     WEBKIT_API static bool isIndexedDatabaseEnabled();
     75 
     76     WEBKIT_API static void enableWebAudio(bool);
     77     WEBKIT_API static bool isWebAudioEnabled();
     78 
     79     WEBKIT_API static void enablePushState(bool);
     80     WEBKIT_API static bool isPushStateEnabled(bool);
     81 
     82     WEBKIT_API static void enableTouch(bool);
     83     WEBKIT_API static bool isTouchEnabled();
     84 
     85     WEBKIT_API static void enableDeviceMotion(bool);
     86     WEBKIT_API static bool isDeviceMotionEnabled();
     87 
     88     WEBKIT_API static void enableDeviceOrientation(bool);
     89     WEBKIT_API static bool isDeviceOrientationEnabled();
     90 
     91     WEBKIT_API static void enableSpeechInput(bool);
     92     WEBKIT_API static bool isSpeechInputEnabled();
     93 
     94     WEBKIT_API static void enableXHRResponseBlob(bool);
     95     WEBKIT_API static bool isXHRResponseBlobEnabled();
     96 
     97     WEBKIT_API static void enableFileSystem(bool);
     98     WEBKIT_API static bool isFileSystemEnabled();
     99 
    100     WEBKIT_API static void enableJavaScriptI18NAPI(bool);
    101     WEBKIT_API static bool isJavaScriptI18NAPIEnabled();
    102 
    103     WEBKIT_API static void enableQuota(bool);
    104     WEBKIT_API static bool isQuotaEnabled();
    105 
    106 private:
    107     WebRuntimeFeatures();
    108 };
    109 
    110 } // namespace WebKit
    111 
    112 #endif
    113