| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebRuntimeFeatures_h | 31 #ifndef WebRuntimeFeatures_h |
| 32 #define WebRuntimeFeatures_h | 32 #define WebRuntimeFeatures_h |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebString.h" | 35 #include "../platform/WebString.h" |
| 36 | 36 |
| 37 #include <string> |
| 38 |
| 37 namespace blink { | 39 namespace blink { |
| 38 | 40 |
| 39 // This class is used to enable runtime features of Blink. | 41 // This class is used to enable runtime features of Blink. |
| 40 // Stable features are enabled by default. | 42 // Stable features are enabled by default. |
| 41 class WebRuntimeFeatures { | 43 class WebRuntimeFeatures { |
| 42 public: | 44 public: |
| 43 BLINK_EXPORT static void enableExperimentalFeatures(bool); | 45 BLINK_EXPORT static void enableExperimentalFeatures(bool); |
| 44 | 46 |
| 45 BLINK_EXPORT static void enableWebBluetooth(bool); | 47 BLINK_EXPORT static void enableWebBluetooth(bool); |
| 46 | 48 |
| 47 BLINK_EXPORT static void enableTestOnlyFeatures(bool); | 49 BLINK_EXPORT static void enableTestOnlyFeatures(bool); |
| 48 | 50 |
| 49 // Enables a feature by its string identifier from | 51 // Enables a feature by its string identifier from |
| 50 // RuntimeEnabledFeatures.in. | 52 // RuntimeEnabledFeatures.in. |
| 53 // Note: We use std::string instead of WebString because this API can |
| 54 // be called before blink::initalize(). We can't create WebString objects |
| 55 // before blink::initialize(). |
| 56 BLINK_EXPORT static void enableFeatureFromString(const std::string& name, bo
ol enable); |
| 57 // TODO(bashi): Remove. |
| 51 BLINK_EXPORT static void enableFeatureFromString(const WebString& name, bool
enable); | 58 BLINK_EXPORT static void enableFeatureFromString(const WebString& name, bool
enable); |
| 52 | 59 |
| 53 BLINK_EXPORT static void enableApplicationCache(bool); | 60 BLINK_EXPORT static void enableApplicationCache(bool); |
| 54 | 61 |
| 55 BLINK_EXPORT static void enableDatabase(bool); | 62 BLINK_EXPORT static void enableDatabase(bool); |
| 56 | 63 |
| 57 BLINK_EXPORT static void enableCompositedSelectionUpdate(bool); | 64 BLINK_EXPORT static void enableCompositedSelectionUpdate(bool); |
| 58 BLINK_EXPORT static bool isCompositedSelectionUpdateEnabled(); | 65 BLINK_EXPORT static bool isCompositedSelectionUpdateEnabled(); |
| 59 | 66 |
| 60 BLINK_EXPORT static void enableDecodeToYUV(bool); | 67 BLINK_EXPORT static void enableDecodeToYUV(bool); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 BLINK_EXPORT static void enableUnsafeES3APIs(bool); | 164 BLINK_EXPORT static void enableUnsafeES3APIs(bool); |
| 158 | 165 |
| 159 BLINK_EXPORT static void enableWebVR(bool); | 166 BLINK_EXPORT static void enableWebVR(bool); |
| 160 private: | 167 private: |
| 161 WebRuntimeFeatures(); | 168 WebRuntimeFeatures(); |
| 162 }; | 169 }; |
| 163 | 170 |
| 164 } // namespace blink | 171 } // namespace blink |
| 165 | 172 |
| 166 #endif | 173 #endif |
| OLD | NEW |