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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 GpuProcessHost::gpu_enabled() && | 440 GpuProcessHost::gpu_enabled() && |
441 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 441 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
442 web_prefs.accelerated_drawing_enabled = | 442 web_prefs.accelerated_drawing_enabled = |
443 GpuProcessHost::gpu_enabled() && | 443 GpuProcessHost::gpu_enabled() && |
444 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); | 444 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); |
445 web_prefs.accelerated_layers_enabled = | 445 web_prefs.accelerated_layers_enabled = |
446 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 446 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
447 web_prefs.composite_to_texture_enabled = | 447 web_prefs.composite_to_texture_enabled = |
448 command_line.HasSwitch(switches::kEnableCompositeToTexture); | 448 command_line.HasSwitch(switches::kEnableCompositeToTexture); |
449 web_prefs.accelerated_plugins_enabled = | 449 web_prefs.accelerated_plugins_enabled = |
450 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); | 450 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); |
451 web_prefs.accelerated_video_enabled = | 451 web_prefs.accelerated_video_enabled = |
452 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 452 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
453 web_prefs.memory_info_enabled = | 453 web_prefs.memory_info_enabled = |
454 command_line.HasSwitch(switches::kEnableMemoryInfo); | 454 command_line.HasSwitch(switches::kEnableMemoryInfo); |
455 web_prefs.interactive_form_validation_enabled = | 455 web_prefs.interactive_form_validation_enabled = |
456 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 456 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
457 web_prefs.fullscreen_enabled = | 457 web_prefs.fullscreen_enabled = |
458 command_line.HasSwitch(switches::kEnableFullScreen); | 458 command_line.HasSwitch(switches::kEnableFullScreen); |
459 web_prefs.allow_displaying_insecure_content = | 459 web_prefs.allow_displaying_insecure_content = |
460 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); | 460 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 DictionaryValue* inspector_settings = update.Get(); | 522 DictionaryValue* inspector_settings = update.Get(); |
523 inspector_settings->SetWithoutPathExpansion(key, | 523 inspector_settings->SetWithoutPathExpansion(key, |
524 Value::CreateStringValue(value)); | 524 Value::CreateStringValue(value)); |
525 } | 525 } |
526 | 526 |
527 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 527 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
528 content::BrowserContext* browser_context) { | 528 content::BrowserContext* browser_context) { |
529 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 529 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
530 ClearPref(prefs::kWebKitInspectorSettings); | 530 ClearPref(prefs::kWebKitInspectorSettings); |
531 } | 531 } |
OLD | NEW |