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

Unified Diff: ash/display/display_controller.h

Issue 10952028: Fix crashers in GetPrimaryDisplay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: return display by value 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 | « no previous file | ash/display/display_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_controller.h
diff --git a/ash/display/display_controller.h b/ash/display/display_controller.h
index ac513cd846efd4dbb474215fc3bf183a6b0e1d1f..8a822cec7fff76088343c8dcec575dfa67202041 100644
--- a/ash/display/display_controller.h
+++ b/ash/display/display_controller.h
@@ -83,6 +83,10 @@ class ASH_EXPORT DisplayController : public aura::DisplayObserver {
DisplayController();
virtual ~DisplayController();
+ // Gets primary display. This information is stored in global
+ // object as this can be accessed after Shell is closed.
+ static gfx::Display GetPrimaryDisplay();
+
// Initializes primary display.
void InitPrimaryDisplay();
@@ -99,10 +103,8 @@ class ASH_EXPORT DisplayController : public aura::DisplayObserver {
// Returns the root window for |display_id|.
aura::RootWindow* GetRootWindowForDisplayId(int64 id);
- // Sets/Gets primary display.
- const gfx::Display& primary_display() const {
- return primary_display_;
- }
+ // Sets primary display. This re-assigns the current root
+ // window to given |display|.
void SetPrimaryDisplay(const gfx::Display& display);
// Returns the secondary display.
@@ -160,8 +162,6 @@ class ASH_EXPORT DisplayController : public aura::DisplayObserver {
ObserverList<Observer> observers_;
- gfx::Display primary_display_;
-
DISALLOW_COPY_AND_ASSIGN(DisplayController);
};
« no previous file with comments | « no previous file | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698