| 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 <memory> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/event_types.h" | 11 #include "base/event_types.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 13 #include "ui/aura/aura_export.h" | 14 #include "ui/aura/aura_export.h" |
| 14 #include "ui/base/cursor/cursor.h" | 15 #include "ui/base/cursor/cursor.h" |
| 15 #include "ui/base/ime/input_method_delegate.h" | 16 #include "ui/base/ime/input_method_delegate.h" |
| 16 #include "ui/events/event_source.h" | 17 #include "ui/events/event_source.h" |
| 17 #include "ui/gfx/geometry/insets.h" | 18 #include "ui/gfx/geometry/insets.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 32 class InputMethod; | 33 class InputMethod; |
| 33 class ViewProp; | 34 class ViewProp; |
| 34 } | 35 } |
| 35 | 36 |
| 36 namespace aura { | 37 namespace aura { |
| 37 namespace test { | 38 namespace test { |
| 38 class WindowTreeHostTestApi; | 39 class WindowTreeHostTestApi; |
| 39 } | 40 } |
| 40 | 41 |
| 41 class WindowEventDispatcher; | 42 class WindowEventDispatcher; |
| 43 class WindowPort; |
| 42 class WindowTreeHostObserver; | 44 class WindowTreeHostObserver; |
| 43 | 45 |
| 44 // WindowTreeHost bridges between a native window and the embedded RootWindow. | 46 // WindowTreeHost bridges between a native window and the embedded RootWindow. |
| 45 // It provides the accelerated widget and maps events from the native os to | 47 // It provides the accelerated widget and maps events from the native os to |
| 46 // aura. | 48 // aura. |
| 47 class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, | 49 class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
| 48 public ui::EventSource { | 50 public ui::EventSource { |
| 49 public: | 51 public: |
| 50 ~WindowTreeHost() override; | 52 ~WindowTreeHost() override; |
| 51 | 53 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // Sets the OS capture to the root window. | 179 // Sets the OS capture to the root window. |
| 178 virtual void SetCapture() = 0; | 180 virtual void SetCapture() = 0; |
| 179 | 181 |
| 180 // Releases OS capture of the root window. | 182 // Releases OS capture of the root window. |
| 181 virtual void ReleaseCapture() = 0; | 183 virtual void ReleaseCapture() = 0; |
| 182 | 184 |
| 183 protected: | 185 protected: |
| 184 friend class TestScreen; // TODO(beng): see if we can remove/consolidate. | 186 friend class TestScreen; // TODO(beng): see if we can remove/consolidate. |
| 185 | 187 |
| 186 WindowTreeHost(); | 188 WindowTreeHost(); |
| 189 explicit WindowTreeHost(std::unique_ptr<WindowPort> window_port); |
| 190 |
| 187 void DestroyCompositor(); | 191 void DestroyCompositor(); |
| 188 void DestroyDispatcher(); | 192 void DestroyDispatcher(); |
| 189 | 193 |
| 190 void CreateCompositor(); | 194 void CreateCompositor(); |
| 191 void OnAcceleratedWidgetAvailable(); | 195 void OnAcceleratedWidgetAvailable(); |
| 192 | 196 |
| 193 // Returns the location of the RootWindow on native screen. | 197 // Returns the location of the RootWindow on native screen. |
| 194 virtual gfx::Point GetLocationOnNativeScreen() const = 0; | 198 virtual gfx::Point GetLocationOnNativeScreen() const = 0; |
| 195 | 199 |
| 196 void OnHostMoved(const gfx::Point& new_location); | 200 void OnHostMoved(const gfx::Point& new_location); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 bool owned_input_method_; | 259 bool owned_input_method_; |
| 256 | 260 |
| 257 gfx::Insets output_surface_padding_; | 261 gfx::Insets output_surface_padding_; |
| 258 | 262 |
| 259 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); | 263 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); |
| 260 }; | 264 }; |
| 261 | 265 |
| 262 } // namespace aura | 266 } // namespace aura |
| 263 | 267 |
| 264 #endif // UI_AURA_WINDOW_TREE_HOST_H_ | 268 #endif // UI_AURA_WINDOW_TREE_HOST_H_ |
| OLD | NEW |