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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/background/background_contents_service.h" | 10 #include "chrome/browser/background/background_contents_service.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 command_line.HasSwitch(switches::kEnableAcceleratedFilters); | 465 command_line.HasSwitch(switches::kEnableAcceleratedFilters); |
466 web_prefs.accelerated_layers_enabled = | 466 web_prefs.accelerated_layers_enabled = |
467 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 467 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
468 web_prefs.composite_to_texture_enabled = | 468 web_prefs.composite_to_texture_enabled = |
469 command_line.HasSwitch(switches::kEnableCompositeToTexture); | 469 command_line.HasSwitch(switches::kEnableCompositeToTexture); |
470 web_prefs.accelerated_plugins_enabled = | 470 web_prefs.accelerated_plugins_enabled = |
471 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); | 471 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); |
472 web_prefs.accelerated_video_enabled = | 472 web_prefs.accelerated_video_enabled = |
473 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 473 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
474 web_prefs.memory_info_enabled = | 474 web_prefs.memory_info_enabled = |
475 command_line.HasSwitch(switches::kEnableMemoryInfo); | 475 prefs->GetBoolean(prefs::kEnableMemoryInfo); |
476 web_prefs.interactive_form_validation_enabled = | 476 web_prefs.interactive_form_validation_enabled = |
477 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 477 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
478 web_prefs.fullscreen_enabled = | 478 web_prefs.fullscreen_enabled = |
479 !command_line.HasSwitch(switches::kDisableFullScreen); | 479 !command_line.HasSwitch(switches::kDisableFullScreen); |
480 web_prefs.allow_displaying_insecure_content = | 480 web_prefs.allow_displaying_insecure_content = |
481 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); | 481 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); |
482 web_prefs.allow_running_insecure_content = | 482 web_prefs.allow_running_insecure_content = |
483 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); | 483 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); |
484 | 484 |
485 #if defined(OS_MACOSX) || defined(TOUCH_UI) | 485 #if defined(OS_MACOSX) || defined(TOUCH_UI) |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 DictionaryValue* inspector_settings = update.Get(); | 584 DictionaryValue* inspector_settings = update.Get(); |
585 inspector_settings->SetWithoutPathExpansion(key, | 585 inspector_settings->SetWithoutPathExpansion(key, |
586 Value::CreateStringValue(value)); | 586 Value::CreateStringValue(value)); |
587 } | 587 } |
588 | 588 |
589 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 589 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
590 content::BrowserContext* browser_context) { | 590 content::BrowserContext* browser_context) { |
591 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 591 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
592 ClearPref(prefs::kWebKitInspectorSettings); | 592 ClearPref(prefs::kWebKitInspectorSettings); |
593 } | 593 } |
OLD | NEW |