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

Unified Diff: ash/screen_ash.cc

Issue 130483009: Return primary display in gfx::Screen during the shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | 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 b0ade929805040de8a2fec943be5a17687c1097c..bbda5ad8a7c3f3c8a173d38dbb03f6cea91a3042 100644
--- a/ash/screen_ash.cc
+++ b/ash/screen_ash.cc
@@ -130,18 +130,26 @@ int ScreenAsh::GetNumDisplays() const {
}
std::vector<gfx::Display> ScreenAsh::GetAllDisplays() const {
+ if (!Shell::HasInstance())
+ return std::vector<gfx::Display>(1, GetPrimaryDisplay());
return GetDisplayManager()->displays();
}
gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const {
+ if (!Shell::HasInstance())
+ return GetPrimaryDisplay();
return GetDisplayController()->GetDisplayNearestWindow(window);
}
gfx::Display ScreenAsh::GetDisplayNearestPoint(const gfx::Point& point) const {
+ if (!Shell::HasInstance())
+ return GetPrimaryDisplay();
return GetDisplayController()->GetDisplayNearestPoint(point);
}
gfx::Display ScreenAsh::GetDisplayMatching(const gfx::Rect& match_rect) const {
+ if (!Shell::HasInstance())
+ return GetPrimaryDisplay();
return GetDisplayController()->GetDisplayMatching(match_rect);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698