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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 prefs->GetBoolean(prefs::kEnableMemoryInfo); | 476 prefs->GetBoolean(prefs::kEnableMemoryInfo); |
477 web_prefs.interactive_form_validation_enabled = | 477 web_prefs.interactive_form_validation_enabled = |
478 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 478 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
479 web_prefs.fullscreen_enabled = | 479 web_prefs.fullscreen_enabled = |
480 !command_line.HasSwitch(switches::kDisableFullScreen); | 480 !command_line.HasSwitch(switches::kDisableFullScreen); |
481 web_prefs.allow_displaying_insecure_content = | 481 web_prefs.allow_displaying_insecure_content = |
482 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); | 482 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); |
483 web_prefs.allow_running_insecure_content = | 483 web_prefs.allow_running_insecure_content = |
484 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); | 484 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); |
485 | 485 |
486 #if defined(OS_MACOSX) || defined(TOUCH_UI) | 486 #if defined(OS_MACOSX) |
487 bool default_enable_scroll_animator = true; | 487 bool default_enable_scroll_animator = true; |
488 #else | 488 #else |
489 // On CrOS, the launcher always passes in the --enable flag. | 489 // On CrOS, the launcher always passes in the --enable flag. |
490 bool default_enable_scroll_animator = false; | 490 bool default_enable_scroll_animator = false; |
491 #endif | 491 #endif |
492 web_prefs.enable_scroll_animator = default_enable_scroll_animator; | 492 web_prefs.enable_scroll_animator = default_enable_scroll_animator; |
493 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) | 493 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) |
494 web_prefs.enable_scroll_animator = true; | 494 web_prefs.enable_scroll_animator = true; |
495 if (command_line.HasSwitch(switches::kDisableSmoothScrolling)) | 495 if (command_line.HasSwitch(switches::kDisableSmoothScrolling)) |
496 web_prefs.enable_scroll_animator = false; | 496 web_prefs.enable_scroll_animator = false; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 DictionaryValue* inspector_settings = update.Get(); | 585 DictionaryValue* inspector_settings = update.Get(); |
586 inspector_settings->SetWithoutPathExpansion(key, | 586 inspector_settings->SetWithoutPathExpansion(key, |
587 Value::CreateStringValue(value)); | 587 Value::CreateStringValue(value)); |
588 } | 588 } |
589 | 589 |
590 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 590 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
591 content::BrowserContext* browser_context) { | 591 content::BrowserContext* browser_context) { |
592 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 592 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
593 ClearPref(prefs::kWebKitInspectorSettings); | 593 ClearPref(prefs::kWebKitInspectorSettings); |
594 } | 594 } |
OLD | NEW |