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/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 if (command_line.HasSwitch(switches::kDefaultTileHeight)) | 659 if (command_line.HasSwitch(switches::kDefaultTileHeight)) |
660 prefs.default_tile_height = | 660 prefs.default_tile_height = |
661 GetSwitchValueAsInt(command_line, switches::kDefaultTileHeight, 1); | 661 GetSwitchValueAsInt(command_line, switches::kDefaultTileHeight, 1); |
662 if (command_line.HasSwitch(switches::kMaxUntiledLayerWidth)) | 662 if (command_line.HasSwitch(switches::kMaxUntiledLayerWidth)) |
663 prefs.max_untiled_layer_width = | 663 prefs.max_untiled_layer_width = |
664 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerWidth, 1); | 664 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerWidth, 1); |
665 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight)) | 665 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight)) |
666 prefs.max_untiled_layer_height = | 666 prefs.max_untiled_layer_height = |
667 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1); | 667 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1); |
668 | 668 |
669 if (gfx::Screen::IsDIPEnabled()) { | 669 // TODO(scottmg): Probably Native is wrong: http://crbug.com/133312 |
| 670 if (gfx::Screen::GetNativeScreen()->IsDIPEnabled()) { |
670 // Only apply when using DIP coordinate system as this setting interferes | 671 // Only apply when using DIP coordinate system as this setting interferes |
671 // with fixed layout mode. | 672 // with fixed layout mode. |
672 prefs.apply_default_device_scale_factor_in_compositor = true; | 673 prefs.apply_default_device_scale_factor_in_compositor = true; |
673 } | 674 } |
674 | 675 |
675 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 676 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
676 switches::kDisableFixedPositionCreatesStackingContext); | 677 switches::kDisableFixedPositionCreatesStackingContext); |
677 | 678 |
678 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 679 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
679 switches::kEnableGestureTapHighlight); | 680 switches::kEnableGestureTapHighlight); |
(...skipping 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3412 } | 3413 } |
3413 } | 3414 } |
3414 | 3415 |
3415 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3416 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3416 return browser_plugin_guest_.get(); | 3417 return browser_plugin_guest_.get(); |
3417 } | 3418 } |
3418 | 3419 |
3419 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3420 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3420 return browser_plugin_embedder_.get(); | 3421 return browser_plugin_embedder_.get(); |
3421 } | 3422 } |
OLD | NEW |