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

Unified Diff: ui/aura/test/test_screen.h

Issue 11363124: Move DisplayManager and DisplayChangeObserverX11 from aura to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix rebase Created 8 years, 1 month 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 | « ui/aura/test/aura_test_helper.cc ('k') | ui/aura/test/test_screen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/test_screen.h
diff --git a/ui/aura/test/test_screen.h b/ui/aura/test/test_screen.h
index ca5524c9923fd3c49f420a81d0864c74b8ded951..8b9d74b99d1d5df13ff37705de55495cabf6f4a1 100644
--- a/ui/aura/test/test_screen.h
+++ b/ui/aura/test/test_screen.h
@@ -6,18 +6,34 @@
#define UI_AURA_TEST_TEST_SCREEN_H_
#include "base/compiler_specific.h"
+#include "ui/aura/window_observer.h"
+#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
+namespace gfx {
+class Rect;
+}
+
namespace aura {
class RootWindow;
+class Window;
// A minimal, testing Aura implementation of gfx::Screen.
-class TestScreen : public gfx::Screen {
+class TestScreen : public gfx::Screen,
+ public WindowObserver {
public:
- explicit TestScreen(aura::RootWindow* root_window);
+ TestScreen();
virtual ~TestScreen();
+ RootWindow* CreateRootWindowForPrimaryDisplay();
+
protected:
+ // WindowObserver overrides:
+ virtual void OnWindowBoundsChanged(Window* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) OVERRIDE;
+ virtual void OnWindowDestroying(Window* window) OVERRIDE;
+
// gfx::Screen overrides:
virtual bool IsDIPEnabled() OVERRIDE;
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
@@ -30,12 +46,14 @@ class TestScreen : public gfx::Screen {
virtual gfx::Display GetDisplayMatching(
const gfx::Rect& match_rect) const OVERRIDE;
virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
+ virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE;
+ virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
private:
- gfx::Display GetMonitor() const;
-
aura::RootWindow* root_window_;
+ gfx::Display display_;
+
DISALLOW_COPY_AND_ASSIGN(TestScreen);
};
« no previous file with comments | « ui/aura/test/aura_test_helper.cc ('k') | ui/aura/test/test_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698