OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 prefs.accelerated_compositing_enabled = false; | 574 prefs.accelerated_compositing_enabled = false; |
575 prefs.accelerated_2d_canvas_enabled = false; | 575 prefs.accelerated_2d_canvas_enabled = false; |
576 } | 576 } |
577 | 577 |
578 prefs.apply_default_device_scale_factor_in_compositor = true; | 578 prefs.apply_default_device_scale_factor_in_compositor = true; |
579 prefs.apply_page_scale_factor_in_compositor = true; | 579 prefs.apply_page_scale_factor_in_compositor = true; |
580 | 580 |
581 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 581 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
582 switches::kDisableFixedPositionCreatesStackingContext); | 582 switches::kDisableFixedPositionCreatesStackingContext); |
583 | 583 |
584 #if defined(OS_CHROMEOS) | |
585 prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch( | |
586 switches::kDisableGestureTapHighlight); | |
587 #else | |
588 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 584 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
589 switches::kEnableGestureTapHighlight); | 585 switches::kEnableGestureTapHighlight); |
590 #endif | |
591 | 586 |
592 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 587 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
593 | 588 |
594 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); | 589 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); |
595 | 590 |
596 prefs.deferred_image_decoding_enabled = | 591 prefs.deferred_image_decoding_enabled = |
597 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | 592 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || |
598 cc::switches::IsImplSidePaintingEnabled(); | 593 cc::switches::IsImplSidePaintingEnabled(); |
599 | 594 |
600 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 595 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
(...skipping 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3404 } | 3399 } |
3405 | 3400 |
3406 BrowserPluginGuestManager* | 3401 BrowserPluginGuestManager* |
3407 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3402 WebContentsImpl::GetBrowserPluginGuestManager() const { |
3408 return static_cast<BrowserPluginGuestManager*>( | 3403 return static_cast<BrowserPluginGuestManager*>( |
3409 GetBrowserContext()->GetUserData( | 3404 GetBrowserContext()->GetUserData( |
3410 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3405 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
3411 } | 3406 } |
3412 | 3407 |
3413 } // namespace content | 3408 } // namespace content |
OLD | NEW |