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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
498 if (profile->GetUserStyleSheetWatcher()) { | 498 if (profile->GetUserStyleSheetWatcher()) { |
499 web_prefs.user_style_sheet_enabled = true; | 499 web_prefs.user_style_sheet_enabled = true; |
500 web_prefs.user_style_sheet_location = | 500 web_prefs.user_style_sheet_location = |
501 profile->GetUserStyleSheetWatcher()->user_style_sheet(); | 501 profile->GetUserStyleSheetWatcher()->user_style_sheet(); |
502 } else { | 502 } else { |
503 web_prefs.user_style_sheet_enabled = false; | 503 web_prefs.user_style_sheet_enabled = false; |
504 } | 504 } |
505 | 505 |
506 web_prefs.visual_word_movement_enabled = | 506 web_prefs.visual_word_movement_enabled = |
507 command_line.HasSwitch(switches::kEnableVisualWordMovement); | 507 command_line.HasSwitch(switches::kEnableVisualWordMovement); |
508 | |
509 web_prefs.unified_textchecker_enabled = | |
darin (slow to review)
2011/11/21 19:04:19
if both of these fields in WebPreferences are set
| |
510 command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures); | |
511 web_prefs.asynchronous_spell_checking_enabled = | |
512 command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures); | |
508 } | 513 } |
509 | 514 |
510 { // Certain GPU features might have been blacklisted. | 515 { // Certain GPU features might have been blacklisted. |
511 GpuDataManager* gpu_data_manager = GpuDataManager::GetInstance(); | 516 GpuDataManager* gpu_data_manager = GpuDataManager::GetInstance(); |
512 DCHECK(gpu_data_manager); | 517 DCHECK(gpu_data_manager); |
513 uint32 blacklist_flags = gpu_data_manager->GetGpuFeatureFlags().flags(); | 518 uint32 blacklist_flags = gpu_data_manager->GetGpuFeatureFlags().flags(); |
514 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureAcceleratedCompositing) | 519 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureAcceleratedCompositing) |
515 web_prefs.accelerated_compositing_enabled = false; | 520 web_prefs.accelerated_compositing_enabled = false; |
516 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureWebgl) | 521 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureWebgl) |
517 web_prefs.experimental_webgl_enabled = false; | 522 web_prefs.experimental_webgl_enabled = false; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
581 DictionaryValue* inspector_settings = update.Get(); | 586 DictionaryValue* inspector_settings = update.Get(); |
582 inspector_settings->SetWithoutPathExpansion(key, | 587 inspector_settings->SetWithoutPathExpansion(key, |
583 Value::CreateStringValue(value)); | 588 Value::CreateStringValue(value)); |
584 } | 589 } |
585 | 590 |
586 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 591 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
587 content::BrowserContext* browser_context) { | 592 content::BrowserContext* browser_context) { |
588 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 593 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
589 ClearPref(prefs::kWebKitInspectorSettings); | 594 ClearPref(prefs::kWebKitInspectorSettings); |
590 } | 595 } |
OLD | NEW |