OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/public/renderer/web_preferences.h" | 5 #include "content/public/renderer/web_preferences.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "third_party/WebKit/public/platform/WebString.h" | 8 #include "third_party/WebKit/public/platform/WebString.h" |
9 #include "third_party/WebKit/public/platform/WebURL.h" | 9 #include "third_party/WebKit/public/platform/WebURL.h" |
10 #include "third_party/WebKit/public/web/WebKit.h" | 10 #include "third_party/WebKit/public/web/WebKit.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 // Enable WebGL errors to the JS console if requested. | 191 // Enable WebGL errors to the JS console if requested. |
192 settings->setWebGLErrorsToConsoleEnabled( | 192 settings->setWebGLErrorsToConsoleEnabled( |
193 prefs.webgl_errors_to_console_enabled); | 193 prefs.webgl_errors_to_console_enabled); |
194 | 194 |
195 // Uses the mock theme engine for scrollbars. | 195 // Uses the mock theme engine for scrollbars. |
196 settings->setMockScrollbarsEnabled(prefs.mock_scrollbars_enabled); | 196 settings->setMockScrollbarsEnabled(prefs.mock_scrollbars_enabled); |
197 | 197 |
198 settings->setLayerSquashingEnabled(prefs.layer_squashing_enabled); | 198 settings->setLayerSquashingEnabled(prefs.layer_squashing_enabled); |
199 | 199 |
200 settings->setThreadedHTMLParser(prefs.threaded_html_parser); | |
201 | |
202 // Enable gpu-accelerated compositing always. | 200 // Enable gpu-accelerated compositing always. |
203 settings->setAcceleratedCompositingEnabled(true); | 201 settings->setAcceleratedCompositingEnabled(true); |
204 | 202 |
205 // Enable gpu-accelerated 2d canvas if requested on the command line. | 203 // Enable gpu-accelerated 2d canvas if requested on the command line. |
206 settings->setAccelerated2dCanvasEnabled(prefs.accelerated_2d_canvas_enabled); | 204 settings->setAccelerated2dCanvasEnabled(prefs.accelerated_2d_canvas_enabled); |
207 | 205 |
208 settings->setMinimumAccelerated2dCanvasSize( | 206 settings->setMinimumAccelerated2dCanvasSize( |
209 prefs.minimum_accelerated_2d_canvas_size); | 207 prefs.minimum_accelerated_2d_canvas_size); |
210 | 208 |
211 // Disable antialiasing for 2d canvas if requested on the command line. | 209 // Disable antialiasing for 2d canvas if requested on the command line. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 334 |
337 WebNetworkStateNotifier::setOnLine(prefs.is_online); | 335 WebNetworkStateNotifier::setOnLine(prefs.is_online); |
338 settings->setPinchVirtualViewportEnabled( | 336 settings->setPinchVirtualViewportEnabled( |
339 prefs.pinch_virtual_viewport_enabled); | 337 prefs.pinch_virtual_viewport_enabled); |
340 | 338 |
341 settings->setPinchOverlayScrollbarThickness( | 339 settings->setPinchOverlayScrollbarThickness( |
342 prefs.pinch_overlay_scrollbar_thickness); | 340 prefs.pinch_overlay_scrollbar_thickness); |
343 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); | 341 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); |
344 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); | 342 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); |
345 | 343 |
| 344 settings->setThreadedHTMLParser(true); |
346 settings->setUseThreadedHTMLParserForDataURLs(true); | 345 settings->setUseThreadedHTMLParserForDataURLs(true); |
347 } | 346 } |
348 | 347 |
349 } // namespace content | 348 } // namespace content |
OLD | NEW |