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

Unified Diff: chrome/browser/ui/views/ash/window_positioner.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix command line Created 8 years, 8 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/views/ash/window_positioner.cc
diff --git a/chrome/browser/ui/views/ash/window_positioner.cc b/chrome/browser/ui/views/ash/window_positioner.cc
index 1639901f3ed2b60636a93876473109c8bca7eff8..707aa39e8608d96b8907e34223c3e6edd9e1520d 100644
--- a/chrome/browser/ui/views/ash/window_positioner.cc
+++ b/chrome/browser/ui/views/ash/window_positioner.cc
@@ -10,6 +10,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/gfx/compositor/layer.h"
+#include "ui/gfx/monitor.h"
#include "ui/gfx/screen.h"
WindowPositioner::WindowPositioner()
@@ -47,7 +48,7 @@ gfx::Rect WindowPositioner::GetPopupPosition(const gfx::Rect& old_pos) {
aura::Window* window = ash::wm::GetActiveWindow();
const gfx::Rect work_area = window && window->IsVisible() ?
gfx::Screen::GetMonitorWorkAreaNearestWindow(window) :
- gfx::Screen::GetPrimaryMonitorWorkArea();
+ gfx::Screen::GetPrimaryMonitor()->GetWorkArea();
// Only try to reposition the popup when it is not spanning the entire
// screen.
if ((old_pos.width() + popup_position_offset_from_screen_corner_x >=

Powered by Google App Engine
This is Rietveld 408576698