OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 web_prefs.accelerated_layers_enabled = | 292 web_prefs.accelerated_layers_enabled = |
293 command_line.HasSwitch(switches::kEnableAcceleratedLayers); | 293 command_line.HasSwitch(switches::kEnableAcceleratedLayers); |
294 web_prefs.accelerated_plugins_enabled = | 294 web_prefs.accelerated_plugins_enabled = |
295 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); | 295 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); |
296 web_prefs.accelerated_video_enabled = | 296 web_prefs.accelerated_video_enabled = |
297 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 297 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
298 web_prefs.memory_info_enabled = | 298 web_prefs.memory_info_enabled = |
299 command_line.HasSwitch(switches::kEnableMemoryInfo); | 299 command_line.HasSwitch(switches::kEnableMemoryInfo); |
300 web_prefs.hyperlink_auditing_enabled = | 300 web_prefs.hyperlink_auditing_enabled = |
301 !command_line.HasSwitch(switches::kNoPings); | 301 !command_line.HasSwitch(switches::kNoPings); |
| 302 web_prefs.interactive_form_validation_enabled = |
| 303 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
302 // The user stylesheet watcher may not exist in a testing profile. | 304 // The user stylesheet watcher may not exist in a testing profile. |
303 if (profile->GetUserStyleSheetWatcher()) { | 305 if (profile->GetUserStyleSheetWatcher()) { |
304 web_prefs.user_style_sheet_enabled = true; | 306 web_prefs.user_style_sheet_enabled = true; |
305 web_prefs.user_style_sheet_location = | 307 web_prefs.user_style_sheet_location = |
306 profile->GetUserStyleSheetWatcher()->user_style_sheet(); | 308 profile->GetUserStyleSheetWatcher()->user_style_sheet(); |
307 } else { | 309 } else { |
308 web_prefs.user_style_sheet_enabled = false; | 310 web_prefs.user_style_sheet_enabled = false; |
309 } | 311 } |
310 } | 312 } |
311 | 313 |
(...skipping 28 matching lines...) Expand all Loading... |
340 inspector_settings->SetWithoutPathExpansion(key, | 342 inspector_settings->SetWithoutPathExpansion(key, |
341 Value::CreateStringValue(value)); | 343 Value::CreateStringValue(value)); |
342 } | 344 } |
343 | 345 |
344 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 346 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
345 DictionaryValue* inspector_settings = | 347 DictionaryValue* inspector_settings = |
346 profile->GetPrefs()->GetMutableDictionary( | 348 profile->GetPrefs()->GetMutableDictionary( |
347 prefs::kWebKitInspectorSettings); | 349 prefs::kWebKitInspectorSettings); |
348 inspector_settings->Clear(); | 350 inspector_settings->Clear(); |
349 } | 351 } |
OLD | NEW |