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

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

Issue 22888006: Use gfx::Screen to provide display information in WindowSizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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
Index: chrome/browser/ui/window_sizer/window_sizer_ash.cc
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash.cc b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
index a4ee1d11e4bd8a0d37fac00a5a6acc972d219297..144cd075a6eb175780cadfca90a1506885218af4 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
@@ -182,7 +182,7 @@ bool WindowSizer::GetBoundsOverrideAsh(gfx::Rect* bounds_in_screen,
// Always open new window in the active display.
gfx::Rect active_area = active->GetBoundsInScreen();
gfx::Rect work_area =
- monitor_info_provider_->GetMonitorWorkAreaMatching(active_area);
+ screen_->GetDisplayMatching(active_area).work_area();
// This is a window / app. See if there is no window and try to place it.
int count = GetNumberOfValidTopLevelBrowserWindows(work_area);
@@ -238,9 +238,8 @@ bool WindowSizer::GetBoundsOverrideAsh(gfx::Rect* bounds_in_screen,
void WindowSizer::GetDefaultWindowBoundsAsh(gfx::Rect* default_bounds) const {
DCHECK(default_bounds);
- DCHECK(monitor_info_provider_.get());
- gfx::Rect work_area = monitor_info_provider_->GetPrimaryDisplayWorkArea();
+ gfx::Rect work_area = screen_->GetPrimaryDisplay().work_area();
// There should be a 'desktop' border around the window at the left and right
// side.
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_common_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698