Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
3415 } 3416 }
3416 } 3417 }
3417 3418
3418 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3419 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3419 return browser_plugin_guest_.get(); 3420 return browser_plugin_guest_.get();
3420 } 3421 }
3421 3422
3422 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3423 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3423 return browser_plugin_embedder_.get(); 3424 return browser_plugin_embedder_.get();
3424 } 3425 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698