| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 show_composited_layer_borders(false), | 66 show_composited_layer_borders(false), |
| 67 show_composited_layer_tree(false), | 67 show_composited_layer_tree(false), |
| 68 show_fps_counter(false), | 68 show_fps_counter(false), |
| 69 asynchronous_spell_checking_enabled(true), | 69 asynchronous_spell_checking_enabled(true), |
| 70 accelerated_compositing_enabled(false), | 70 accelerated_compositing_enabled(false), |
| 71 force_compositing_mode(false), | 71 force_compositing_mode(false), |
| 72 composite_to_texture_enabled(false), | 72 composite_to_texture_enabled(false), |
| 73 accelerated_layers_enabled(false), | 73 accelerated_layers_enabled(false), |
| 74 accelerated_video_enabled(false), | 74 accelerated_video_enabled(false), |
| 75 accelerated_2d_canvas_enabled(false), | 75 accelerated_2d_canvas_enabled(false), |
| 76 accelerated_drawing_enabled(false), |
| 76 accelerated_plugins_enabled(false), | 77 accelerated_plugins_enabled(false), |
| 77 memory_info_enabled(false), | 78 memory_info_enabled(false), |
| 78 interactive_form_validation_enabled(true), | 79 interactive_form_validation_enabled(true), |
| 79 fullscreen_enabled(false) { | 80 fullscreen_enabled(false) { |
| 80 } | 81 } |
| 81 | 82 |
| 82 WebPreferences::~WebPreferences() { | 83 WebPreferences::~WebPreferences() { |
| 83 } | 84 } |
| 84 | 85 |
| 85 void WebPreferences::Apply(WebView* web_view) const { | 86 void WebPreferences::Apply(WebView* web_view) const { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 177 |
| 177 // Always enter compositing if requested on the command line. | 178 // Always enter compositing if requested on the command line. |
| 178 settings->setForceCompositingMode(force_compositing_mode); | 179 settings->setForceCompositingMode(force_compositing_mode); |
| 179 | 180 |
| 180 // Enable composite to offscreen texture if requested on the command line. | 181 // Enable composite to offscreen texture if requested on the command line. |
| 181 settings->setCompositeToTextureEnabled(composite_to_texture_enabled); | 182 settings->setCompositeToTextureEnabled(composite_to_texture_enabled); |
| 182 | 183 |
| 183 // Enable gpu-accelerated 2d canvas if requested on the command line. | 184 // Enable gpu-accelerated 2d canvas if requested on the command line. |
| 184 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); | 185 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); |
| 185 | 186 |
| 187 // Enable gpu-accelerated drawing if requested on the command line. |
| 188 settings->setAcceleratedDrawingEnabled(accelerated_drawing_enabled); |
| 189 |
| 186 // Enabling accelerated layers from the command line enabled accelerated | 190 // Enabling accelerated layers from the command line enabled accelerated |
| 187 // 3D CSS, Video, and Animations. | 191 // 3D CSS, Video, and Animations. |
| 188 settings->setAcceleratedCompositingFor3DTransformsEnabled( | 192 settings->setAcceleratedCompositingFor3DTransformsEnabled( |
| 189 accelerated_layers_enabled); | 193 accelerated_layers_enabled); |
| 190 settings->setAcceleratedCompositingForVideoEnabled( | 194 settings->setAcceleratedCompositingForVideoEnabled( |
| 191 accelerated_video_enabled); | 195 accelerated_video_enabled); |
| 192 settings->setAcceleratedCompositingForAnimationEnabled( | 196 settings->setAcceleratedCompositingForAnimationEnabled( |
| 193 accelerated_layers_enabled); | 197 accelerated_layers_enabled); |
| 194 | 198 |
| 195 // Enabling accelerated plugins if specified from the command line. | 199 // Enabling accelerated plugins if specified from the command line. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 213 | 217 |
| 214 // Tabs to link is not part of the settings. WebCore calls | 218 // Tabs to link is not part of the settings. WebCore calls |
| 215 // ChromeClient::tabsToLinks which is part of the glue code. | 219 // ChromeClient::tabsToLinks which is part of the glue code. |
| 216 web_view->setTabsToLinks(tabs_to_links); | 220 web_view->setTabsToLinks(tabs_to_links); |
| 217 | 221 |
| 218 settings->setInteractiveFormValidationEnabled( | 222 settings->setInteractiveFormValidationEnabled( |
| 219 interactive_form_validation_enabled); | 223 interactive_form_validation_enabled); |
| 220 | 224 |
| 221 settings->setFullScreenEnabled(fullscreen_enabled); | 225 settings->setFullScreenEnabled(fullscreen_enabled); |
| 222 } | 226 } |
| OLD | NEW |