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/WebRuntimeFeatures.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 composite_to_texture_enabled(false), | 73 composite_to_texture_enabled(false), |
74 accelerated_layers_enabled(false), | 74 accelerated_layers_enabled(false), |
75 accelerated_video_enabled(false), | 75 accelerated_video_enabled(false), |
76 accelerated_2d_canvas_enabled(false), | 76 accelerated_2d_canvas_enabled(false), |
77 accelerated_drawing_enabled(false), | 77 accelerated_drawing_enabled(false), |
78 accelerated_plugins_enabled(false), | 78 accelerated_plugins_enabled(false), |
79 memory_info_enabled(false), | 79 memory_info_enabled(false), |
80 interactive_form_validation_enabled(true), | 80 interactive_form_validation_enabled(true), |
81 fullscreen_enabled(false), | 81 fullscreen_enabled(false), |
82 allow_displaying_insecure_content(true), | 82 allow_displaying_insecure_content(true), |
83 allow_running_insecure_content(false) { | 83 allow_running_insecure_content(false), |
84 enable_scroll_animator(false) { | |
84 } | 85 } |
85 | 86 |
86 WebPreferences::~WebPreferences() { | 87 WebPreferences::~WebPreferences() { |
87 } | 88 } |
88 | 89 |
89 void WebPreferences::Apply(WebView* web_view) const { | 90 void WebPreferences::Apply(WebView* web_view) const { |
90 WebSettings* settings = web_view->settings(); | 91 WebSettings* settings = web_view->settings(); |
91 settings->setStandardFontFamily(standard_font_family); | 92 settings->setStandardFontFamily(standard_font_family); |
92 settings->setFixedFontFamily(fixed_font_family); | 93 settings->setFixedFontFamily(fixed_font_family); |
93 settings->setSerifFontFamily(serif_font_family); | 94 settings->setSerifFontFamily(serif_font_family); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 // Tabs to link is not part of the settings. WebCore calls | 223 // Tabs to link is not part of the settings. WebCore calls |
223 // ChromeClient::tabsToLinks which is part of the glue code. | 224 // ChromeClient::tabsToLinks which is part of the glue code. |
224 web_view->setTabsToLinks(tabs_to_links); | 225 web_view->setTabsToLinks(tabs_to_links); |
225 | 226 |
226 settings->setInteractiveFormValidationEnabled( | 227 settings->setInteractiveFormValidationEnabled( |
227 interactive_form_validation_enabled); | 228 interactive_form_validation_enabled); |
228 | 229 |
229 settings->setFullScreenEnabled(fullscreen_enabled); | 230 settings->setFullScreenEnabled(fullscreen_enabled); |
230 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); | 231 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); |
231 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); | 232 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); |
233 #if defined(ENABLE_SMOOTH_SCROLLING) | |
darin (slow to review)
2011/05/31 20:40:24
we normally do not use WebKit ENABLE_ macros in ch
Scott Byer
2011/05/31 21:02:45
If I leave it unprotected, the compile breaks unti
| |
234 settings->setEnableScrollAnimator(enable_scroll_animator); | |
235 #endif | |
232 } | 236 } |
OLD | NEW |