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 "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); | 286 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); |
287 web_prefs.show_composited_layer_borders = | 287 web_prefs.show_composited_layer_borders = |
288 command_line.HasSwitch(switches::kShowCompositedLayerBorders); | 288 command_line.HasSwitch(switches::kShowCompositedLayerBorders); |
289 web_prefs.show_composited_layer_tree = | 289 web_prefs.show_composited_layer_tree = |
290 command_line.HasSwitch(switches::kShowCompositedLayerTree); | 290 command_line.HasSwitch(switches::kShowCompositedLayerTree); |
291 web_prefs.show_fps_counter = | 291 web_prefs.show_fps_counter = |
292 command_line.HasSwitch(switches::kShowFPSCounter); | 292 command_line.HasSwitch(switches::kShowFPSCounter); |
293 web_prefs.accelerated_compositing_enabled = | 293 web_prefs.accelerated_compositing_enabled = |
294 gpu_enabled() && | 294 gpu_enabled() && |
295 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 295 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 296 web_prefs.force_compositing_mode = |
| 297 command_line.HasSwitch(switches::kForceCompositingMode); |
296 web_prefs.accelerated_2d_canvas_enabled = | 298 web_prefs.accelerated_2d_canvas_enabled = |
297 gpu_enabled() && | 299 gpu_enabled() && |
298 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); | 300 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); |
299 web_prefs.accelerated_layers_enabled = | 301 web_prefs.accelerated_layers_enabled = |
300 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 302 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
301 web_prefs.composite_to_texture_enabled = | 303 web_prefs.composite_to_texture_enabled = |
302 command_line.HasSwitch(switches::kEnableCompositeToTexture); | 304 command_line.HasSwitch(switches::kEnableCompositeToTexture); |
303 web_prefs.accelerated_plugins_enabled = | 305 web_prefs.accelerated_plugins_enabled = |
304 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); | 306 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); |
305 web_prefs.accelerated_video_enabled = | 307 web_prefs.accelerated_video_enabled = |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 inspector_settings->SetWithoutPathExpansion(key, | 368 inspector_settings->SetWithoutPathExpansion(key, |
367 Value::CreateStringValue(value)); | 369 Value::CreateStringValue(value)); |
368 } | 370 } |
369 | 371 |
370 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 372 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
371 DictionaryValue* inspector_settings = | 373 DictionaryValue* inspector_settings = |
372 profile->GetPrefs()->GetMutableDictionary( | 374 profile->GetPrefs()->GetMutableDictionary( |
373 prefs::kWebKitInspectorSettings); | 375 prefs::kWebKitInspectorSettings); |
374 inspector_settings->Clear(); | 376 inspector_settings->Clear(); |
375 } | 377 } |
OLD | NEW |