diff options
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_delegate_helper.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 4 | ||||
-rw-r--r-- | webkit/api/public/WebSettings.h | 1 | ||||
-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 | 2 |
9 files changed, 22 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index bf5386e..a26a8d9 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -186,6 +186,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( command_line.HasSwitch(switches::kEnableSessionStorage); web_prefs.experimental_webgl_enabled = command_line.HasSwitch(switches::kEnableExperimentalWebGL); + web_prefs.experimental_notifications_enabled = + command_line.HasSwitch(switches::kEnableDesktopNotifications); } web_prefs.uses_universal_detector = diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 1bbbf81..913d895 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -620,4 +620,8 @@ const wchar_t kActivateOnLaunch[] = L"activate-on-launch"; // Enable experimental WebGL support. const wchar_t kEnableExperimentalWebGL[] = L"enable-webgl"; +// Enabled desktop notifications. +const wchar_t kEnableDesktopNotifications[] = + L"enable-desktop-notifications"; + } // namespace switches diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 19b9b06..802532f 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -250,6 +250,8 @@ extern const wchar_t kActivateOnLaunch[]; extern const wchar_t kEnableExperimentalWebGL[]; +extern const wchar_t kEnableDesktopNotifications[]; + } // namespace switches #endif // CHROME_COMMON_CHROME_SWITCHES_H_ diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 1dfc4b9..bd1b676 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1651,6 +1651,7 @@ struct ParamTraits<WebPreferences> { WriteParam(m, p.session_storage_enabled); WriteParam(m, p.application_cache_enabled); WriteParam(m, p.experimental_webgl_enabled); + WriteParam(m, p.experimental_notifications_enabled); } static bool Read(const Message* m, void** iter, param_type* p) { return @@ -1686,7 +1687,8 @@ struct ParamTraits<WebPreferences> { ReadParam(m, iter, &p->databases_enabled) && ReadParam(m, iter, &p->session_storage_enabled) && ReadParam(m, iter, &p->application_cache_enabled) && - ReadParam(m, iter, &p->experimental_webgl_enabled); + ReadParam(m, iter, &p->experimental_webgl_enabled) && + ReadParam(m, iter, &p->experimental_notifications_enabled); } static void Log(const param_type& p, std::wstring* l) { l->append(L"<WebPreferences>"); diff --git a/webkit/api/public/WebSettings.h b/webkit/api/public/WebSettings.h index 40e10f6..ab6dbd2 100644 --- a/webkit/api/public/WebSettings.h +++ b/webkit/api/public/WebSettings.h @@ -80,6 +80,7 @@ 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/WebSettingsImpl.cpp b/webkit/api/src/WebSettingsImpl.cpp index 8c52ce0..c74c16f 100644 --- a/webkit/api/src/WebSettingsImpl.cpp +++ b/webkit/api/src/WebSettingsImpl.cpp @@ -249,4 +249,9 @@ 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 62eae9c..cd56497 100644 --- a/webkit/api/src/WebSettingsImpl.h +++ b/webkit/api/src/WebSettingsImpl.h @@ -82,6 +82,7 @@ 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 07a0d77..e8de550 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -52,6 +52,8 @@ void WebPreferences::Apply(WebView* web_view) const { settings->setDatabasesEnabled(WebKit::databasesEnabled() || 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 1608d9d..7d34be6 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -49,6 +49,7 @@ struct WebPreferences { bool session_storage_enabled; bool application_cache_enabled; bool tabs_to_links; + bool experimental_notifications_enabled; // TODO(tc): User style sheets will not work in chrome because it tries to // load the style sheet using a request without a frame. @@ -94,6 +95,7 @@ struct WebPreferences { session_storage_enabled(false), application_cache_enabled(false), tabs_to_links(true), + experimental_notifications_enabled(false), user_style_sheet_enabled(false), allow_universal_access_from_file_urls(false), experimental_webgl_enabled(false) { |