OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/glue/webpreferences.h" | 5 #include "webkit/glue/webpreferences.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 accelerated_video_enabled(false), | 78 accelerated_video_enabled(false), |
79 accelerated_2d_canvas_enabled(false), | 79 accelerated_2d_canvas_enabled(false), |
80 accelerated_drawing_enabled(false), | 80 accelerated_drawing_enabled(false), |
81 accelerated_plugins_enabled(false), | 81 accelerated_plugins_enabled(false), |
82 memory_info_enabled(false), | 82 memory_info_enabled(false), |
83 interactive_form_validation_enabled(true), | 83 interactive_form_validation_enabled(true), |
84 fullscreen_enabled(false), | 84 fullscreen_enabled(false), |
85 allow_displaying_insecure_content(true), | 85 allow_displaying_insecure_content(true), |
86 allow_running_insecure_content(false), | 86 allow_running_insecure_content(false), |
87 should_print_backgrounds(false), | 87 should_print_backgrounds(false), |
88 enable_scroll_animator(false) { | 88 enable_scroll_animator(false), |
| 89 hixie76_websocket_protocol_enabled(false) { |
89 } | 90 } |
90 | 91 |
91 WebPreferences::~WebPreferences() { | 92 WebPreferences::~WebPreferences() { |
92 } | 93 } |
93 | 94 |
94 void WebPreferences::Apply(WebView* web_view) const { | 95 void WebPreferences::Apply(WebView* web_view) const { |
95 WebSettings* settings = web_view->settings(); | 96 WebSettings* settings = web_view->settings(); |
96 settings->setStandardFontFamily(standard_font_family); | 97 settings->setStandardFontFamily(standard_font_family); |
97 settings->setFixedFontFamily(fixed_font_family); | 98 settings->setFixedFontFamily(fixed_font_family); |
98 settings->setSerifFontFamily(serif_font_family); | 99 settings->setSerifFontFamily(serif_font_family); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 web_view->setTabsToLinks(tabs_to_links); | 230 web_view->setTabsToLinks(tabs_to_links); |
230 | 231 |
231 settings->setInteractiveFormValidationEnabled( | 232 settings->setInteractiveFormValidationEnabled( |
232 interactive_form_validation_enabled); | 233 interactive_form_validation_enabled); |
233 | 234 |
234 settings->setFullScreenEnabled(fullscreen_enabled); | 235 settings->setFullScreenEnabled(fullscreen_enabled); |
235 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); | 236 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); |
236 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); | 237 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); |
237 settings->setShouldPrintBackgrounds(should_print_backgrounds); | 238 settings->setShouldPrintBackgrounds(should_print_backgrounds); |
238 settings->setEnableScrollAnimator(enable_scroll_animator); | 239 settings->setEnableScrollAnimator(enable_scroll_animator); |
| 240 settings->setHixie76WebSocketProtocolEnabled( |
| 241 hixie76_websocket_protocol_enabled); |
239 | 242 |
240 WebNetworkStateNotifier::setOnLine(is_online); | 243 WebNetworkStateNotifier::setOnLine(is_online); |
241 } | 244 } |
OLD | NEW |