OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ | 5 #ifndef COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ |
6 #define COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ | 6 #define COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual void Init(DisplayManagerDelegate* delegate) = 0; | 68 virtual void Init(DisplayManagerDelegate* delegate) = 0; |
69 | 69 |
70 // Schedules a paint for the specified region in the coordinates of |window|. | 70 // Schedules a paint for the specified region in the coordinates of |window|. |
71 virtual void SchedulePaint(const ServerWindow* window, | 71 virtual void SchedulePaint(const ServerWindow* window, |
72 const gfx::Rect& bounds) = 0; | 72 const gfx::Rect& bounds) = 0; |
73 | 73 |
74 virtual void SetViewportSize(const gfx::Size& size) = 0; | 74 virtual void SetViewportSize(const gfx::Size& size) = 0; |
75 | 75 |
76 virtual void SetTitle(const base::string16& title) = 0; | 76 virtual void SetTitle(const base::string16& title) = 0; |
77 | 77 |
| 78 virtual void SetCapture() = 0; |
| 79 |
| 80 virtual void ReleaseCapture() = 0; |
| 81 |
78 virtual void SetCursorById(int32_t cursor) = 0; | 82 virtual void SetCursorById(int32_t cursor) = 0; |
79 | 83 |
80 virtual mojom::Rotation GetRotation() = 0; | 84 virtual mojom::Rotation GetRotation() = 0; |
81 | 85 |
82 virtual const mojom::ViewportMetrics& GetViewportMetrics() = 0; | 86 virtual const mojom::ViewportMetrics& GetViewportMetrics() = 0; |
83 | 87 |
84 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; | 88 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; |
85 virtual void SetImeVisibility(bool visible) = 0; | 89 virtual void SetImeVisibility(bool visible) = 0; |
86 | 90 |
87 // Returns true if a compositor frame has been submitted but not drawn yet. | 91 // Returns true if a compositor frame has been submitted but not drawn yet. |
(...skipping 19 matching lines...) Expand all Loading... |
107 const scoped_refptr<GpuState>& gpu_state, | 111 const scoped_refptr<GpuState>& gpu_state, |
108 const scoped_refptr<SurfacesState>& surfaces_state); | 112 const scoped_refptr<SurfacesState>& surfaces_state); |
109 ~DefaultDisplayManager() override; | 113 ~DefaultDisplayManager() override; |
110 | 114 |
111 // DisplayManager: | 115 // DisplayManager: |
112 void Init(DisplayManagerDelegate* delegate) override; | 116 void Init(DisplayManagerDelegate* delegate) override; |
113 void SchedulePaint(const ServerWindow* window, | 117 void SchedulePaint(const ServerWindow* window, |
114 const gfx::Rect& bounds) override; | 118 const gfx::Rect& bounds) override; |
115 void SetViewportSize(const gfx::Size& size) override; | 119 void SetViewportSize(const gfx::Size& size) override; |
116 void SetTitle(const base::string16& title) override; | 120 void SetTitle(const base::string16& title) override; |
| 121 void SetCapture() override; |
| 122 void ReleaseCapture() override; |
117 void SetCursorById(int32_t cursor) override; | 123 void SetCursorById(int32_t cursor) override; |
118 const mojom::ViewportMetrics& GetViewportMetrics() override; | 124 const mojom::ViewportMetrics& GetViewportMetrics() override; |
119 mojom::Rotation GetRotation() override; | 125 mojom::Rotation GetRotation() override; |
120 void UpdateTextInputState(const ui::TextInputState& state) override; | 126 void UpdateTextInputState(const ui::TextInputState& state) override; |
121 void SetImeVisibility(bool visible) override; | 127 void SetImeVisibility(bool visible) override; |
122 bool IsFramePending() const override; | 128 bool IsFramePending() const override; |
123 | 129 |
124 private: | 130 private: |
125 void WantToDraw(); | 131 void WantToDraw(); |
126 | 132 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_; | 175 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_; |
170 | 176 |
171 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager); | 177 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager); |
172 }; | 178 }; |
173 | 179 |
174 } // namespace ws | 180 } // namespace ws |
175 | 181 |
176 } // namespace mus | 182 } // namespace mus |
177 | 183 |
178 #endif // COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ | 184 #endif // COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ |
OLD | NEW |