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

Unified Diff: ash/screen_ash.cc

Issue 10905288: Switch primary display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 3 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 | « ash/screen_ash.h ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/screen_ash.cc
diff --git a/ash/screen_ash.cc b/ash/screen_ash.cc
index 74a6f96f59c79639b6a624d395945bc52ca70aba..e72dfb1705f3525dcbd354fb3296814b5229e20f 100644
--- a/ash/screen_ash.cc
+++ b/ash/screen_ash.cc
@@ -4,6 +4,7 @@
#include "ash/screen_ash.h"
+#include "ash/display/display_controller.h"
#include "ash/display/multi_display_manager.h"
#include "ash/shell.h"
#include "ash/wm/coordinate_conversion.h"
@@ -85,6 +86,11 @@ gfx::Rect ScreenAsh::ConvertRectFromScreen(aura::Window* window,
return gfx::Rect(point, rect.size());
}
+// static
+const gfx::Display& ScreenAsh::GetSecondaryDisplay() {
+ return *(Shell::GetInstance()->display_controller()->GetSecondaryDisplay());
+}
+
gfx::Point ScreenAsh::GetCursorScreenPoint() {
return aura::Env::GetInstance()->last_mouse_location();
}
@@ -111,7 +117,7 @@ gfx::Display ScreenAsh::GetDisplayMatching(const gfx::Rect& match_rect) const {
}
gfx::Display ScreenAsh::GetPrimaryDisplay() const {
- return *GetDisplayManager()->GetDisplayAt(0);
+ return Shell::GetInstance()->display_controller()->primary_display();
}
} // namespace ash
« no previous file with comments | « ash/screen_ash.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698