OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_AURA_TEST_TEST_SCREEN_H_ | 5 #ifndef UI_AURA_TEST_TEST_SCREEN_H_ |
6 #define UI_AURA_TEST_TEST_SCREEN_H_ | 6 #define UI_AURA_TEST_TEST_SCREEN_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/aura/window_observer.h" | 9 #include "ui/aura/window_observer.h" |
10 #include "ui/gfx/display.h" | 10 #include "ui/gfx/display.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 void SetUIScale(float ui_scale); | 38 void SetUIScale(float ui_scale); |
39 void SetWorkAreaInsets(const gfx::Insets& insets); | 39 void SetWorkAreaInsets(const gfx::Insets& insets); |
40 | 40 |
41 protected: | 41 protected: |
42 gfx::Transform GetRotationTransform() const; | 42 gfx::Transform GetRotationTransform() const; |
43 gfx::Transform GetUIScaleTransform() const; | 43 gfx::Transform GetUIScaleTransform() const; |
44 | 44 |
45 // WindowObserver overrides: | 45 // WindowObserver overrides: |
46 virtual void OnWindowBoundsChanged(Window* window, | 46 virtual void OnWindowBoundsChanged(Window* window, |
47 const gfx::Rect& old_bounds, | 47 const gfx::Rect& old_bounds, |
48 const gfx::Rect& new_bounds) OVERRIDE; | 48 const gfx::Rect& new_bounds) override; |
49 virtual void OnWindowDestroying(Window* window) OVERRIDE; | 49 virtual void OnWindowDestroying(Window* window) override; |
50 | 50 |
51 // gfx::Screen overrides: | 51 // gfx::Screen overrides: |
52 virtual bool IsDIPEnabled() OVERRIDE; | 52 virtual bool IsDIPEnabled() override; |
53 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 53 virtual gfx::Point GetCursorScreenPoint() override; |
54 virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE; | 54 virtual gfx::NativeWindow GetWindowUnderCursor() override; |
55 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) | 55 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) |
56 OVERRIDE; | 56 override; |
57 virtual int GetNumDisplays() const OVERRIDE; | 57 virtual int GetNumDisplays() const override; |
58 virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE; | 58 virtual std::vector<gfx::Display> GetAllDisplays() const override; |
59 virtual gfx::Display GetDisplayNearestWindow( | 59 virtual gfx::Display GetDisplayNearestWindow( |
60 gfx::NativeView view) const OVERRIDE; | 60 gfx::NativeView view) const override; |
61 virtual gfx::Display GetDisplayNearestPoint( | 61 virtual gfx::Display GetDisplayNearestPoint( |
62 const gfx::Point& point) const OVERRIDE; | 62 const gfx::Point& point) const override; |
63 virtual gfx::Display GetDisplayMatching( | 63 virtual gfx::Display GetDisplayMatching( |
64 const gfx::Rect& match_rect) const OVERRIDE; | 64 const gfx::Rect& match_rect) const override; |
65 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | 65 virtual gfx::Display GetPrimaryDisplay() const override; |
66 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE; | 66 virtual void AddObserver(gfx::DisplayObserver* observer) override; |
67 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; | 67 virtual void RemoveObserver(gfx::DisplayObserver* observer) override; |
68 | 68 |
69 private: | 69 private: |
70 explicit TestScreen(const gfx::Rect& screen_bounds); | 70 explicit TestScreen(const gfx::Rect& screen_bounds); |
71 | 71 |
72 aura::WindowTreeHost* host_; | 72 aura::WindowTreeHost* host_; |
73 | 73 |
74 gfx::Display display_; | 74 gfx::Display display_; |
75 | 75 |
76 float ui_scale_; | 76 float ui_scale_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(TestScreen); | 78 DISALLOW_COPY_AND_ASSIGN(TestScreen); |
79 }; | 79 }; |
80 | 80 |
81 } // namespace aura | 81 } // namespace aura |
82 | 82 |
83 #endif // UI_AURA_TEST_TEST_SCREEN_H_ | 83 #endif // UI_AURA_TEST_TEST_SCREEN_H_ |
OLD | NEW |