OLD | NEW |
1 // Copyright (c) 2009 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" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 allow_universal_access_from_file_urls(false), | 61 allow_universal_access_from_file_urls(false), |
62 allow_file_access_from_file_urls(false), | 62 allow_file_access_from_file_urls(false), |
63 webaudio_enabled(false), | 63 webaudio_enabled(false), |
64 experimental_webgl_enabled(false), | 64 experimental_webgl_enabled(false), |
65 gl_multisampling_enabled(true), | 65 gl_multisampling_enabled(true), |
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 composite_to_texture_enabled(false), | 72 composite_to_texture_enabled(false), |
72 accelerated_layers_enabled(false), | 73 accelerated_layers_enabled(false), |
73 accelerated_video_enabled(false), | 74 accelerated_video_enabled(false), |
74 accelerated_2d_canvas_enabled(false), | 75 accelerated_2d_canvas_enabled(false), |
75 accelerated_plugins_enabled(false), | 76 accelerated_plugins_enabled(false), |
76 memory_info_enabled(false), | 77 memory_info_enabled(false), |
77 interactive_form_validation_enabled(true), | 78 interactive_form_validation_enabled(true), |
78 fullscreen_enabled(false) { | 79 fullscreen_enabled(false) { |
79 } | 80 } |
80 | 81 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Display an FPS indicator if requested on the command line. | 169 // Display an FPS indicator if requested on the command line. |
169 settings->setShowFPSCounter(show_fps_counter); | 170 settings->setShowFPSCounter(show_fps_counter); |
170 | 171 |
171 // Display the current compositor tree as overlay if requested on | 172 // Display the current compositor tree as overlay if requested on |
172 // the command line | 173 // the command line |
173 settings->setShowPlatformLayerTree(show_composited_layer_tree); | 174 settings->setShowPlatformLayerTree(show_composited_layer_tree); |
174 | 175 |
175 // Enable gpu-accelerated compositing if requested on the command line. | 176 // Enable gpu-accelerated compositing if requested on the command line. |
176 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled); | 177 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled); |
177 | 178 |
| 179 // Always enter compositing if requested on the command line. |
| 180 settings->setForceCompositingMode(force_compositing_mode); |
| 181 |
178 // Enable composite to offscreen texture if requested on the command line. | 182 // Enable composite to offscreen texture if requested on the command line. |
179 settings->setCompositeToTextureEnabled(composite_to_texture_enabled); | 183 settings->setCompositeToTextureEnabled(composite_to_texture_enabled); |
180 | 184 |
181 // Enable gpu-accelerated 2d canvas if requested on the command line. | 185 // Enable gpu-accelerated 2d canvas if requested on the command line. |
182 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); | 186 settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); |
183 | 187 |
184 // Enabling accelerated layers from the command line enabled accelerated | 188 // Enabling accelerated layers from the command line enabled accelerated |
185 // 3D CSS, Video, and Animations. | 189 // 3D CSS, Video, and Animations. |
186 settings->setAcceleratedCompositingFor3DTransformsEnabled( | 190 settings->setAcceleratedCompositingFor3DTransformsEnabled( |
187 accelerated_layers_enabled); | 191 accelerated_layers_enabled); |
(...skipping 23 matching lines...) Expand all Loading... |
211 | 215 |
212 // Tabs to link is not part of the settings. WebCore calls | 216 // Tabs to link is not part of the settings. WebCore calls |
213 // ChromeClient::tabsToLinks which is part of the glue code. | 217 // ChromeClient::tabsToLinks which is part of the glue code. |
214 web_view->setTabsToLinks(tabs_to_links); | 218 web_view->setTabsToLinks(tabs_to_links); |
215 | 219 |
216 settings->setInteractiveFormValidationEnabled( | 220 settings->setInteractiveFormValidationEnabled( |
217 interactive_form_validation_enabled); | 221 interactive_form_validation_enabled); |
218 | 222 |
219 settings->setFullScreenEnabled(fullscreen_enabled); | 223 settings->setFullScreenEnabled(fullscreen_enabled); |
220 } | 224 } |
OLD | NEW |