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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 web_prefs.accelerated_plugins_enabled = | 300 web_prefs.accelerated_plugins_enabled = |
301 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); | 301 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); |
302 web_prefs.accelerated_video_enabled = | 302 web_prefs.accelerated_video_enabled = |
303 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 303 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
304 web_prefs.memory_info_enabled = | 304 web_prefs.memory_info_enabled = |
305 command_line.HasSwitch(switches::kEnableMemoryInfo); | 305 command_line.HasSwitch(switches::kEnableMemoryInfo); |
306 web_prefs.hyperlink_auditing_enabled = | 306 web_prefs.hyperlink_auditing_enabled = |
307 !command_line.HasSwitch(switches::kNoPings); | 307 !command_line.HasSwitch(switches::kNoPings); |
308 web_prefs.interactive_form_validation_enabled = | 308 web_prefs.interactive_form_validation_enabled = |
309 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 309 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
310 web_prefs.fullscreen_enabled = | |
311 command_line.HasSwitch(switches::kEnableFullScreen); | |
312 | |
313 // The user stylesheet watcher may not exist in a testing profile. | 310 // The user stylesheet watcher may not exist in a testing profile. |
314 if (profile->GetUserStyleSheetWatcher()) { | 311 if (profile->GetUserStyleSheetWatcher()) { |
315 web_prefs.user_style_sheet_enabled = true; | 312 web_prefs.user_style_sheet_enabled = true; |
316 web_prefs.user_style_sheet_location = | 313 web_prefs.user_style_sheet_location = |
317 profile->GetUserStyleSheetWatcher()->user_style_sheet(); | 314 profile->GetUserStyleSheetWatcher()->user_style_sheet(); |
318 } else { | 315 } else { |
319 web_prefs.user_style_sheet_enabled = false; | 316 web_prefs.user_style_sheet_enabled = false; |
320 } | 317 } |
321 } | 318 } |
322 | 319 |
(...skipping 28 matching lines...) Expand all Loading... |
351 inspector_settings->SetWithoutPathExpansion(key, | 348 inspector_settings->SetWithoutPathExpansion(key, |
352 Value::CreateStringValue(value)); | 349 Value::CreateStringValue(value)); |
353 } | 350 } |
354 | 351 |
355 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 352 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
356 DictionaryValue* inspector_settings = | 353 DictionaryValue* inspector_settings = |
357 profile->GetPrefs()->GetMutableDictionary( | 354 profile->GetPrefs()->GetMutableDictionary( |
358 prefs::kWebKitInspectorSettings); | 355 prefs::kWebKitInspectorSettings); |
359 inspector_settings->Clear(); | 356 inspector_settings->Clear(); |
360 } | 357 } |
OLD | NEW |