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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer.cc

Issue 348513002: On Windows ASH ensure that we get the display created for the root window serving ASH. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review comments Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/window_sizer/window_sizer.cc
diff --git a/chrome/browser/ui/window_sizer/window_sizer.cc b/chrome/browser/ui/window_sizer/window_sizer.cc
index ac5486fb7cbb748ccb608a62a15e3cc6039f54f9..9c957777de9bc0ead0dd84fe3524aa90870b2c53 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer.cc
@@ -146,8 +146,16 @@ class DefaultTargetDisplayProvider : public WindowSizer::TargetDisplayProvider {
const gfx::Screen* screen,
const gfx::Rect& bounds) const OVERRIDE {
#if defined(USE_ASH)
+ bool force_ash = false;
+ // On Windows check if the browser is launched to serve ASH. If yes then
+ // we should get the display for the corresponding root window created for
+ // ASH. This ensures that the display gets the correct workarea, etc.
+#if defined(OS_WIN)
+ force_ash =
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kViewerConnect);
+#endif
// Use the target display on ash.
- if (chrome::ShouldOpenAshOnStartup()) {
+ if (chrome::ShouldOpenAshOnStartup() || force_ash) {
aura::Window* target = ash::Shell::GetTargetRootWindow();
return screen->GetDisplayNearestWindow(target);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698