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_WINDOW_TREE_HOST_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_H_ |
6 #define UI_AURA_WINDOW_TREE_HOST_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 | 159 |
160 // Sets the currently displayed cursor. | 160 // Sets the currently displayed cursor. |
161 virtual void SetCursorNative(gfx::NativeCursor cursor) = 0; | 161 virtual void SetCursorNative(gfx::NativeCursor cursor) = 0; |
162 | 162 |
163 // Moves the cursor to the specified location relative to the root window. | 163 // Moves the cursor to the specified location relative to the root window. |
164 virtual void MoveCursorToNative(const gfx::Point& location) = 0; | 164 virtual void MoveCursorToNative(const gfx::Point& location) = 0; |
165 | 165 |
166 // kCalled when the cursor visibility has changed. | 166 // kCalled when the cursor visibility has changed. |
167 virtual void OnCursorVisibilityChangedNative(bool show) = 0; | 167 virtual void OnCursorVisibilityChangedNative(bool show) = 0; |
168 | 168 |
169 scoped_ptr<WindowEventDispatcher> dispatcher_; | |
170 | |
sadrul
2015/02/07 17:25:34
This should be private
tdresser
2015/02/09 15:23:39
Done.
| |
169 private: | 171 private: |
170 friend class test::WindowTreeHostTestApi; | 172 friend class test::WindowTreeHostTestApi; |
171 | 173 |
172 // Moves the cursor to the specified location. This method is internally used | 174 // Moves the cursor to the specified location. This method is internally used |
173 // by MoveCursorTo() and MoveCursorToHostLocation(). | 175 // by MoveCursorTo() and MoveCursorToHostLocation(). |
174 void MoveCursorToInternal(const gfx::Point& root_location, | 176 void MoveCursorToInternal(const gfx::Point& root_location, |
175 const gfx::Point& host_location); | 177 const gfx::Point& host_location); |
176 | 178 |
177 // We don't use a scoped_ptr for |window_| since we need this ptr to be valid | 179 // We don't use a scoped_ptr for |window_| since we need this ptr to be valid |
178 // during its deletion. (Window's dtor notifies observers that may attempt to | 180 // during its deletion. (Window's dtor notifies observers that may attempt to |
179 // reach back up to access this object which will be valid until the end of | 181 // reach back up to access this object which will be valid until the end of |
180 // the dtor). | 182 // the dtor). |
181 Window* window_; // Owning. | 183 Window* window_; // Owning. |
182 | 184 |
183 ObserverList<WindowTreeHostObserver> observers_; | 185 ObserverList<WindowTreeHostObserver> observers_; |
184 | 186 |
185 scoped_ptr<WindowEventDispatcher> dispatcher_; | |
186 | |
187 scoped_ptr<ui::Compositor> compositor_; | 187 scoped_ptr<ui::Compositor> compositor_; |
188 | 188 |
189 // Last cursor set. Used for testing. | 189 // Last cursor set. Used for testing. |
190 gfx::NativeCursor last_cursor_; | 190 gfx::NativeCursor last_cursor_; |
191 gfx::Point last_cursor_request_position_in_host_; | 191 gfx::Point last_cursor_request_position_in_host_; |
192 | 192 |
193 scoped_ptr<ui::ViewProp> prop_; | 193 scoped_ptr<ui::ViewProp> prop_; |
194 | 194 |
195 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); | 195 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); |
196 }; | 196 }; |
197 | 197 |
198 } // namespace aura | 198 } // namespace aura |
199 | 199 |
200 #endif // UI_AURA_WINDOW_TREE_HOST_H_ | 200 #endif // UI_AURA_WINDOW_TREE_HOST_H_ |
OLD | NEW |