summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 05:18:47 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 05:18:47 +0000
commit72f768a95663ee17fd318bfa2c52b493f3317828 (patch)
tree1c887428bd312abf0dc7dd6d233151e33176834b /webkit
parent3d4bd23ffafc9e4cdb423e0f3e524976969097e3 (diff)
downloadchromium_src-72f768a95663ee17fd318bfa2c52b493f3317828.zip
chromium_src-72f768a95663ee17fd318bfa2c52b493f3317828.tar.gz
chromium_src-72f768a95663ee17fd318bfa2c52b493f3317828.tar.bz2
Implement --enable-web-sockets flag.
BUG=12497 TEST=none Review URL: http://codereview.chromium.org/255075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/api/public/WebSettings.h1
-rw-r--r--webkit/api/src/WebSettingsImpl.cpp7
-rw-r--r--webkit/api/src/WebSettingsImpl.h1
-rw-r--r--webkit/glue/webpreferences.cc1
-rw-r--r--webkit/glue/webpreferences.h2
5 files changed, 12 insertions, 0 deletions
diff --git a/webkit/api/public/WebSettings.h b/webkit/api/public/WebSettings.h
index ab6dbd2..beee889 100644
--- a/webkit/api/public/WebSettings.h
+++ b/webkit/api/public/WebSettings.h
@@ -81,6 +81,7 @@ namespace WebKit {
virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
virtual void setExperimentalWebGLEnabled(bool) = 0;
virtual void setExperimentalNotificationsEnabled(bool) = 0;
+ virtual void setExperimentalWebSocketsEnabled(bool) = 0;
protected:
~WebSettings() { }
diff --git a/webkit/api/src/WebSettingsImpl.cpp b/webkit/api/src/WebSettingsImpl.cpp
index c74c16f..e6785f7 100644
--- a/webkit/api/src/WebSettingsImpl.cpp
+++ b/webkit/api/src/WebSettingsImpl.cpp
@@ -254,4 +254,11 @@ void WebSettingsImpl::setExperimentalNotificationsEnabled(bool enabled)
m_settings->setExperimentalNotificationsEnabled(enabled);
}
+void WebSettingsImpl::setExperimentalWebSocketsEnabled(bool enabled)
+{
+#if ENABLE(WEB_SOCKETS)
+ m_settings->setExperimentalWebSocketsEnabled(enabled);
+#endif
+}
+
} // namespace WebKit
diff --git a/webkit/api/src/WebSettingsImpl.h b/webkit/api/src/WebSettingsImpl.h
index cd56497..491cbdb 100644
--- a/webkit/api/src/WebSettingsImpl.h
+++ b/webkit/api/src/WebSettingsImpl.h
@@ -83,6 +83,7 @@ namespace WebKit {
virtual void setOfflineWebApplicationCacheEnabled(bool);
virtual void setExperimentalWebGLEnabled(bool);
virtual void setExperimentalNotificationsEnabled(bool);
+ virtual void setExperimentalWebSocketsEnabled(bool);
private:
WebCore::Settings* m_settings;
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index e8de550..b134db2 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -54,6 +54,7 @@ void WebPreferences::Apply(WebView* web_view) const {
settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled);
settings->setExperimentalNotificationsEnabled(
experimental_notifications_enabled);
+ settings->setExperimentalWebSocketsEnabled(web_sockets_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 c875228..feae9f2 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 web_sockets_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.
@@ -95,6 +96,7 @@ struct WebPreferences {
session_storage_enabled(false),
application_cache_enabled(false),
tabs_to_links(true),
+ web_sockets_enabled(false),
user_style_sheet_enabled(false),
allow_universal_access_from_file_urls(false),
experimental_webgl_enabled(false),