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

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: 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
« chrome/browser/ui/ash/ash_init.h ('K') | « chrome/browser/ui/ash/ash_init.cc ('k') | 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..2efe92a9f107c29b2411a5e4e3b369508c6e26f0 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer.cc
@@ -146,8 +146,15 @@ 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 = chrome::IsAshProcess();
+#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);
}
« chrome/browser/ui/ash/ash_init.h ('K') | « chrome/browser/ui/ash/ash_init.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698