Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 | 59 |
| 60 Window* window() { return window_; } | 60 Window* window() { return window_; } |
| 61 const Window* window() const { return window_; } | 61 const Window* window() const { return window_; } |
| 62 | 62 |
| 63 ui::EventProcessor* event_processor(); | 63 ui::EventProcessor* event_processor(); |
| 64 | 64 |
| 65 WindowEventDispatcher* dispatcher() { | 65 WindowEventDispatcher* dispatcher() { |
| 66 return const_cast<WindowEventDispatcher*>( | 66 return const_cast<WindowEventDispatcher*>( |
| 67 const_cast<const WindowTreeHost*>(this)->dispatcher()); | 67 const_cast<const WindowTreeHost*>(this)->dispatcher()); |
| 68 } | 68 } |
| 69 const WindowEventDispatcher* dispatcher() const { return dispatcher_.get(); } | |
| 70 | 69 |
| 71 ui::Compositor* compositor() { return compositor_.get(); } | 70 ui::Compositor* compositor() { return compositor_.get(); } |
| 72 | 71 |
| 73 // Gets/Sets the root window's transform. | 72 // Gets/Sets the root window's transform. |
| 74 virtual gfx::Transform GetRootTransform() const; | 73 virtual gfx::Transform GetRootTransform() const; |
| 75 virtual void SetRootTransform(const gfx::Transform& transform); | 74 virtual void SetRootTransform(const gfx::Transform& transform); |
| 76 virtual gfx::Transform GetInverseRootTransform() const; | 75 virtual gfx::Transform GetInverseRootTransform() const; |
| 77 | 76 |
| 78 // Updates the root window's size using |host_size|, current | 77 // Updates the root window's size using |host_size|, current |
| 79 // transform and insets. | 78 // transform and insets. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 const gfx::Point& host_location); | 174 const gfx::Point& host_location); |
| 176 | 175 |
| 177 // We don't use a scoped_ptr for |window_| since we need this ptr to be valid | 176 // 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 | 177 // 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 | 178 // reach back up to access this object which will be valid until the end of |
| 180 // the dtor). | 179 // the dtor). |
| 181 Window* window_; // Owning. | 180 Window* window_; // Owning. |
| 182 | 181 |
| 183 ObserverList<WindowTreeHostObserver> observers_; | 182 ObserverList<WindowTreeHostObserver> observers_; |
| 184 | 183 |
| 185 scoped_ptr<WindowEventDispatcher> dispatcher_; | 184 const WindowEventDispatcher* dispatcher() const { return dispatcher_.get(); } |
| 186 | 185 |
| 187 scoped_ptr<ui::Compositor> compositor_; | 186 scoped_ptr<ui::Compositor> compositor_; |
| 188 | 187 |
| 189 // Last cursor set. Used for testing. | 188 // Last cursor set. Used for testing. |
| 190 gfx::NativeCursor last_cursor_; | 189 gfx::NativeCursor last_cursor_; |
| 191 gfx::Point last_cursor_request_position_in_host_; | 190 gfx::Point last_cursor_request_position_in_host_; |
| 192 | 191 |
| 193 scoped_ptr<ui::ViewProp> prop_; | 192 scoped_ptr<ui::ViewProp> prop_; |
| 193 scoped_ptr<WindowEventDispatcher> dispatcher_; | |
| 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_ |
|
sadrul
2015/02/13 01:53:12
Are any of the changes in this file necessary?
tdresser
2015/02/18 20:05:37
Done.
| |
| OLD | NEW |