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