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

Unified Diff: ash/display/screen_ash.h

Issue 2294853003: Break dependency between ash::DisplayManager and ash::ScreenAsh (Closed)
Patch Set: rebased Created 4 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/display/display_manager.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/display/screen_ash.h b/ash/display/screen_ash.h
index 93a26d9003ee7cf647ce303916be5a46571e1639..15337a2d988933d709b5398e1b7104c46f06e8bb 100644
--- a/ash/display/screen_ash.h
+++ b/ash/display/screen_ash.h
@@ -8,20 +8,19 @@
#include <stdint.h>
#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/observer_list.h"
-#include "ui/display/display_observer.h"
#include "ui/display/screen.h"
+namespace display {
+class DisplayObserver;
+}
+
namespace gfx {
class Rect;
}
namespace ash {
-namespace internal {
class DisplayManager;
-}
// Aura implementation of display::Screen. Implemented here to avoid circular
// dependencies.
@@ -45,20 +44,13 @@ class ASH_EXPORT ScreenAsh : public display::Screen {
void AddObserver(display::DisplayObserver* observer) override;
void RemoveObserver(display::DisplayObserver* observer) override;
- private:
- friend class DisplayManager;
+ // CreateDisplayManager with a ScreenAsh instance.
+ static DisplayManager* CreateDisplayManager();
- // Notifies observers of display configuration changes.
- void NotifyMetricsChanged(const display::Display& display, uint32_t metrics);
- void NotifyDisplayAdded(const display::Display& display);
- void NotifyDisplayRemoved(const display::Display& display);
-
- // Creates a screen that can be used during shutdown.
- // It simply has a copy of the displays.
- display::Screen* CloneForShutdown();
-
- base::ObserverList<display::DisplayObserver> observers_;
+ // Create a screen instance to be used during shutdown.
+ static void CreateScreenForShutdown();
+ private:
DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
};
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/display/screen_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698