Chromium Code Reviews| 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 640 if (command_line.HasSwitch(switches::kDefaultTileHeight)) | 640 if (command_line.HasSwitch(switches::kDefaultTileHeight)) |
| 641 prefs.default_tile_height = | 641 prefs.default_tile_height = |
| 642 GetSwitchValueAsInt(command_line, switches::kDefaultTileHeight, 1); | 642 GetSwitchValueAsInt(command_line, switches::kDefaultTileHeight, 1); |
| 643 if (command_line.HasSwitch(switches::kMaxUntiledLayerWidth)) | 643 if (command_line.HasSwitch(switches::kMaxUntiledLayerWidth)) |
| 644 prefs.max_untiled_layer_width = | 644 prefs.max_untiled_layer_width = |
| 645 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerWidth, 1); | 645 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerWidth, 1); |
| 646 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight)) | 646 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight)) |
| 647 prefs.max_untiled_layer_height = | 647 prefs.max_untiled_layer_height = |
| 648 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1); | 648 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1); |
| 649 | 649 |
| 650 // TODO(scottmg): Probably Native is wrong: http://crbug.com/133312 | 650 prefs.apply_default_device_scale_factor_in_compositor = true; |
| 651 if (gfx::Screen::GetNativeScreen()->IsDIPEnabled()) { | 651 prefs.apply_page_scale_factor_in_compositor = true; |
|
piman
2013/02/01 00:25:09
apply_page_scale_factor_in_compositor was only set
| |
| 652 // Only apply when using DIP coordinate system as this setting interferes | |
| 653 // with fixed layout mode. | |
| 654 // TODO(danakj): Fixed layout mode is going away, so turn this on always. | |
| 655 prefs.apply_default_device_scale_factor_in_compositor = true; | |
| 656 } | |
| 657 | |
| 658 prefs.apply_page_scale_factor_in_compositor = | |
| 659 command_line.HasSwitch(switches::kEnablePinch); | |
| 660 | |
| 661 if (command_line.HasSwitch(switches::kEnableCssTransformPinch)) { | |
| 662 prefs.apply_default_device_scale_factor_in_compositor = false; | |
| 663 prefs.apply_page_scale_factor_in_compositor = false; | |
| 664 } | |
| 665 | 652 |
| 666 prefs.per_tile_painting_enabled = | 653 prefs.per_tile_painting_enabled = |
| 667 command_line.HasSwitch(cc::switches::kEnablePerTilePainting); | 654 command_line.HasSwitch(cc::switches::kEnablePerTilePainting); |
| 668 prefs.accelerated_animation_enabled = | 655 prefs.accelerated_animation_enabled = |
| 669 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 656 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 670 | 657 |
| 671 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 658 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
| 672 switches::kDisableFixedPositionCreatesStackingContext); | 659 switches::kDisableFixedPositionCreatesStackingContext); |
| 673 | 660 |
| 674 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 661 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
| (...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3449 | 3436 |
| 3450 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3437 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
| 3451 return browser_plugin_guest_.get(); | 3438 return browser_plugin_guest_.get(); |
| 3452 } | 3439 } |
| 3453 | 3440 |
| 3454 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3441 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
| 3455 return browser_plugin_embedder_.get(); | 3442 return browser_plugin_embedder_.get(); |
| 3456 } | 3443 } |
| 3457 | 3444 |
| 3458 } // namespace content | 3445 } // namespace content |
| OLD | NEW |