diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-31 03:27:19 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-31 03:27:19 +0000 |
commit | bfa69d49b17f33635c79f79819b90a8d2089c4b3 (patch) | |
tree | a2877f29a6b04dd388d444898fae755ab3e63ff7 /webkit | |
parent | e5d8bbbfb7b636643bf30f89f7d952d13a20473e (diff) | |
download | chromium_src-bfa69d49b17f33635c79f79819b90a8d2089c4b3.zip chromium_src-bfa69d49b17f33635c79f79819b90a8d2089c4b3.tar.gz chromium_src-bfa69d49b17f33635c79f79819b90a8d2089c4b3.tar.bz2 |
Change notification cmd line enabling to use the new RuntimeEnabledFeatures code.
BUG=25318
TEST=none
Review URL: http://codereview.chromium.org/339093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/api/public/WebRuntimeFeatures.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebSettings.h | 1 | ||||
-rw-r--r-- | webkit/api/src/WebRuntimeFeatures.cpp | 16 | ||||
-rw-r--r-- | webkit/api/src/WebSettingsImpl.cpp | 5 | ||||
-rw-r--r-- | webkit/api/src/WebSettingsImpl.h | 1 | ||||
-rw-r--r-- | webkit/glue/webpreferences.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webpreferences.h | 4 |
7 files changed, 20 insertions, 12 deletions
diff --git a/webkit/api/public/WebRuntimeFeatures.h b/webkit/api/public/WebRuntimeFeatures.h index 110665e..a924921 100644 --- a/webkit/api/public/WebRuntimeFeatures.h +++ b/webkit/api/public/WebRuntimeFeatures.h @@ -56,6 +56,9 @@ public: WEBKIT_API static void enableSockets(bool); WEBKIT_API static bool isSocketsEnabled(); + WEBKIT_API static void enableNotifications(bool); + WEBKIT_API static bool isNotificationsEnabled(); + private: WebRuntimeFeatures(); }; diff --git a/webkit/api/public/WebSettings.h b/webkit/api/public/WebSettings.h index ab6dbd2..40e10f6 100644 --- a/webkit/api/public/WebSettings.h +++ b/webkit/api/public/WebSettings.h @@ -80,7 +80,6 @@ namespace WebKit { virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0; virtual void setOfflineWebApplicationCacheEnabled(bool) = 0; virtual void setExperimentalWebGLEnabled(bool) = 0; - virtual void setExperimentalNotificationsEnabled(bool) = 0; protected: ~WebSettings() { } diff --git a/webkit/api/src/WebRuntimeFeatures.cpp b/webkit/api/src/WebRuntimeFeatures.cpp index fb51928..b3d3ff6 100644 --- a/webkit/api/src/WebRuntimeFeatures.cpp +++ b/webkit/api/src/WebRuntimeFeatures.cpp @@ -119,4 +119,20 @@ bool WebRuntimeFeatures::isSocketsEnabled() #endif } +void WebRuntimeFeatures::enableNotifications(bool enable) +{ +#if ENABLE(NOTIFICATIONS) + RuntimeEnabledFeatures::setNotificationsEnabled(enable); +#endif +} + +bool WebRuntimeFeatures::isNotificationsEnabled() +{ +#if ENABLE(NOTIFICATIONS) + return RuntimeEnabledFeatures::notificationsEnabled(); +#else + return false; +#endif +} + } // namespace WebKit diff --git a/webkit/api/src/WebSettingsImpl.cpp b/webkit/api/src/WebSettingsImpl.cpp index c74c16f..8c52ce0 100644 --- a/webkit/api/src/WebSettingsImpl.cpp +++ b/webkit/api/src/WebSettingsImpl.cpp @@ -249,9 +249,4 @@ void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled) m_settings->setWebGLEnabled(enabled); } -void WebSettingsImpl::setExperimentalNotificationsEnabled(bool enabled) -{ - m_settings->setExperimentalNotificationsEnabled(enabled); -} - } // namespace WebKit diff --git a/webkit/api/src/WebSettingsImpl.h b/webkit/api/src/WebSettingsImpl.h index cd56497..62eae9c 100644 --- a/webkit/api/src/WebSettingsImpl.h +++ b/webkit/api/src/WebSettingsImpl.h @@ -82,7 +82,6 @@ namespace WebKit { virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); virtual void setOfflineWebApplicationCacheEnabled(bool); virtual void setExperimentalWebGLEnabled(bool); - virtual void setExperimentalNotificationsEnabled(bool); private: WebCore::Settings* m_settings; diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc index 0f17804..758ac81 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -56,8 +56,6 @@ void WebPreferences::Apply(WebView* web_view) const { WebRuntimeFeatures::isDatabaseEnabled() || databases_enabled); settings->setSessionStorageEnabled(session_storage_enabled); settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); - settings->setExperimentalNotificationsEnabled( - experimental_notifications_enabled); // This setting affects the behavior of links in an editable region: // clicking the link should select it rather than navigate to it. diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index 0693fb9..cad5b5d 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -60,7 +60,6 @@ struct WebPreferences { bool allow_universal_access_from_file_urls; bool experimental_webgl_enabled; - bool experimental_notifications_enabled; // We try to keep the default values the same as the default values in // chrome, except for the cases where it would require lots of extra work for @@ -99,8 +98,7 @@ struct WebPreferences { tabs_to_links(true), user_style_sheet_enabled(false), allow_universal_access_from_file_urls(false), - experimental_webgl_enabled(false), - experimental_notifications_enabled(false) { + experimental_webgl_enabled(false) { } void Apply(WebKit::WebView* web_view) const; |