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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 web_prefs.memory_info_enabled = | 334 web_prefs.memory_info_enabled = |
335 command_line.HasSwitch(switches::kEnableMemoryInfo); | 335 command_line.HasSwitch(switches::kEnableMemoryInfo); |
336 web_prefs.interactive_form_validation_enabled = | 336 web_prefs.interactive_form_validation_enabled = |
337 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 337 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
338 web_prefs.fullscreen_enabled = | 338 web_prefs.fullscreen_enabled = |
339 command_line.HasSwitch(switches::kEnableFullScreen); | 339 command_line.HasSwitch(switches::kEnableFullScreen); |
340 web_prefs.allow_displaying_insecure_content = | 340 web_prefs.allow_displaying_insecure_content = |
341 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); | 341 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); |
342 web_prefs.allow_running_insecure_content = | 342 web_prefs.allow_running_insecure_content = |
343 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); | 343 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); |
| 344 web_prefs.enable_scroll_animator = |
| 345 command_line.HasSwitch(switches::kEnableSmoothScrolling); |
344 | 346 |
345 // The user stylesheet watcher may not exist in a testing profile. | 347 // The user stylesheet watcher may not exist in a testing profile. |
346 if (profile->GetUserStyleSheetWatcher()) { | 348 if (profile->GetUserStyleSheetWatcher()) { |
347 web_prefs.user_style_sheet_enabled = true; | 349 web_prefs.user_style_sheet_enabled = true; |
348 web_prefs.user_style_sheet_location = | 350 web_prefs.user_style_sheet_location = |
349 profile->GetUserStyleSheetWatcher()->user_style_sheet(); | 351 profile->GetUserStyleSheetWatcher()->user_style_sheet(); |
350 } else { | 352 } else { |
351 web_prefs.user_style_sheet_enabled = false; | 353 web_prefs.user_style_sheet_enabled = false; |
352 } | 354 } |
353 } | 355 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 DictionaryPrefUpdate update(profile->GetPrefs(), | 396 DictionaryPrefUpdate update(profile->GetPrefs(), |
395 prefs::kWebKitInspectorSettings); | 397 prefs::kWebKitInspectorSettings); |
396 DictionaryValue* inspector_settings = update.Get(); | 398 DictionaryValue* inspector_settings = update.Get(); |
397 inspector_settings->SetWithoutPathExpansion(key, | 399 inspector_settings->SetWithoutPathExpansion(key, |
398 Value::CreateStringValue(value)); | 400 Value::CreateStringValue(value)); |
399 } | 401 } |
400 | 402 |
401 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 403 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
402 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); | 404 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); |
403 } | 405 } |
OLD | NEW |