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 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 web_prefs.per_tile_drawing_enabled = |
| 509 command_line.HasSwitch(switches::kEnablePerTileDrawing); |
508 } | 510 } |
509 | 511 |
510 { // Certain GPU features might have been blacklisted. | 512 { // Certain GPU features might have been blacklisted. |
511 GpuDataManager* gpu_data_manager = GpuDataManager::GetInstance(); | 513 GpuDataManager* gpu_data_manager = GpuDataManager::GetInstance(); |
512 DCHECK(gpu_data_manager); | 514 DCHECK(gpu_data_manager); |
513 uint32 blacklist_flags = gpu_data_manager->GetGpuFeatureFlags().flags(); | 515 uint32 blacklist_flags = gpu_data_manager->GetGpuFeatureFlags().flags(); |
514 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureAcceleratedCompositing) | 516 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureAcceleratedCompositing) |
515 web_prefs.accelerated_compositing_enabled = false; | 517 web_prefs.accelerated_compositing_enabled = false; |
516 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureWebgl) | 518 if (blacklist_flags & GpuFeatureFlags::kGpuFeatureWebgl) |
517 web_prefs.experimental_webgl_enabled = false; | 519 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(); | 583 DictionaryValue* inspector_settings = update.Get(); |
582 inspector_settings->SetWithoutPathExpansion(key, | 584 inspector_settings->SetWithoutPathExpansion(key, |
583 Value::CreateStringValue(value)); | 585 Value::CreateStringValue(value)); |
584 } | 586 } |
585 | 587 |
586 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 588 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
587 content::BrowserContext* browser_context) { | 589 content::BrowserContext* browser_context) { |
588 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 590 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
589 ClearPref(prefs::kWebKitInspectorSettings); | 591 ClearPref(prefs::kWebKitInspectorSettings); |
590 } | 592 } |
OLD | NEW |