| 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);
|
| }
|
|
|