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

Unified Diff: ash/display/screen_ash.h

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure screen_for_shutdown is reset everytime 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 | « ash/display/root_window_transformers_unittest.cc ('k') | ash/display/screen_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/screen_ash.h
diff --git a/ash/screen_ash.h b/ash/display/screen_ash.h
similarity index 90%
copy from ash/screen_ash.h
copy to ash/display/screen_ash.h
index 6c076075e6ad13209b82a6e67968ff445118aeb6..970ec855432f2ecbdaa7003c5641a443b16adbd9 100644
--- a/ash/screen_ash.h
+++ b/ash/display/screen_ash.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_SCREEN_ASH_H_
-#define ASH_SCREEN_ASH_H_
+#ifndef ASH_DISPLAY_SCREEN_ASH_H_
+#define ASH_DISPLAY_SCREEN_ASH_H_
#include "ash/ash_export.h"
#include "base/compiler_specific.h"
@@ -15,6 +15,9 @@ class Rect;
}
namespace ash {
+namespace internal {
+class DisplayManager;
+}
// Aura implementation of gfx::Screen. Implemented here to avoid circular
// dependencies.
@@ -56,12 +59,6 @@ class ASH_EXPORT ScreenAsh : public gfx::Screen {
// invalid display if no such display is connected.
static const gfx::Display& GetDisplayForId(int64 display_id);
- // Notifies observers of display configuration changes.
- void NotifyBoundsChanged(const gfx::Display& display);
- void NotifyDisplayAdded(const gfx::Display& display);
- void NotifyDisplayRemoved(const gfx::Display& display);
-
- protected:
// gfx::Screen overrides:
virtual bool IsDIPEnabled() OVERRIDE;
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
@@ -81,6 +78,17 @@ class ASH_EXPORT ScreenAsh : public gfx::Screen {
virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
private:
+ friend class internal::DisplayManager;
+
+ // Notifies observers of display configuration changes.
+ void NotifyBoundsChanged(const gfx::Display& display);
+ void NotifyDisplayAdded(const gfx::Display& display);
+ void NotifyDisplayRemoved(const gfx::Display& display);
+
+ // Creates a screen that can be used during shutdown.
+ // It simply has a copy of the displays.
+ gfx::Screen* CloneForShutdown();
+
ObserverList<gfx::DisplayObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
@@ -88,4 +96,4 @@ class ASH_EXPORT ScreenAsh : public gfx::Screen {
} // namespace ash
-#endif // ASH_SCREEN_ASH_H_
+#endif // ASH_DISPLAY_SCREEN_ASH_H_
« no previous file with comments | « ash/display/root_window_transformers_unittest.cc ('k') | ash/display/screen_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698