OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 5 #ifndef UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 15 matching lines...) Expand all Loading... |
26 namespace aura { | 26 namespace aura { |
27 namespace client { | 27 namespace client { |
28 class DefaultCaptureClient; | 28 class DefaultCaptureClient; |
29 class ScreenPositionClient; | 29 class ScreenPositionClient; |
30 class WindowTreeClient; | 30 class WindowTreeClient; |
31 } | 31 } |
32 class Window; | 32 class Window; |
33 } | 33 } |
34 | 34 |
35 namespace ui { | 35 namespace ui { |
| 36 class BitmapUploader; |
36 class Window; | 37 class Window; |
37 class WindowTreeClient; | 38 class WindowTreeClient; |
38 namespace mojom { | 39 namespace mojom { |
39 enum class Cursor; | 40 enum class Cursor; |
40 enum class EventResult; | 41 enum class EventResult; |
41 } | 42 } |
42 } | 43 } |
43 | 44 |
| 45 namespace shell { |
| 46 class Connector; |
| 47 } |
| 48 |
44 namespace ui { | 49 namespace ui { |
45 class Event; | 50 class Event; |
| 51 class ViewProp; |
46 } | 52 } |
47 | 53 |
48 namespace wm { | 54 namespace wm { |
49 class CursorManager; | 55 class CursorManager; |
50 class FocusController; | 56 class FocusController; |
51 } | 57 } |
52 | 58 |
53 namespace views { | 59 namespace views { |
54 class SurfaceContextFactory; | 60 class SurfaceContextFactory; |
55 class WidgetDelegate; | 61 class WidgetDelegate; |
56 | 62 |
57 // An implementation of NativeWidget that binds to a ui::Window. Because Aura | 63 // An implementation of NativeWidget that binds to a ui::Window. Because Aura |
58 // is used extensively within Views code, this code uses aura and binds to the | 64 // is used extensively within Views code, this code uses aura and binds to the |
59 // ui::Window via a Mus-specific aura::WindowTreeHost impl. Because the root | 65 // ui::Window via a Mus-specific aura::WindowTreeHost impl. Because the root |
60 // aura::Window in a hierarchy is created without a delegate by the | 66 // aura::Window in a hierarchy is created without a delegate by the |
61 // aura::WindowTreeHost, we must create a child aura::Window in this class | 67 // aura::WindowTreeHost, we must create a child aura::Window in this class |
62 // (content_) and attach it to the root. | 68 // (content_) and attach it to the root. |
63 class VIEWS_MUS_EXPORT NativeWidgetMus | 69 class VIEWS_MUS_EXPORT NativeWidgetMus |
64 : public internal::NativeWidgetPrivate, | 70 : public internal::NativeWidgetPrivate, |
65 public aura::WindowDelegate, | 71 public aura::WindowDelegate, |
66 public aura::WindowTreeHostObserver, | 72 public aura::WindowTreeHostObserver, |
67 public NON_EXPORTED_BASE(ui::InputEventHandler) { | 73 public NON_EXPORTED_BASE(ui::InputEventHandler) { |
68 public: | 74 public: |
69 NativeWidgetMus(internal::NativeWidgetDelegate* delegate, | 75 NativeWidgetMus(internal::NativeWidgetDelegate* delegate, |
| 76 shell::Connector* connector, |
70 ui::Window* window, | 77 ui::Window* window, |
71 ui::mojom::SurfaceType surface_type); | 78 ui::mojom::SurfaceType surface_type); |
72 ~NativeWidgetMus() override; | 79 ~NativeWidgetMus() override; |
73 | 80 |
74 // Configures the set of properties supplied to the window manager when | 81 // Configures the set of properties supplied to the window manager when |
75 // creating a new Window for a Widget. | 82 // creating a new Window for a Widget. |
76 static void ConfigurePropertiesForNewWindow( | 83 static void ConfigurePropertiesForNewWindow( |
77 const Widget::InitParams& init_params, | 84 const Widget::InitParams& init_params, |
78 std::map<std::string, std::vector<uint8_t>>* properties); | 85 std::map<std::string, std::vector<uint8_t>>* properties); |
79 | 86 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 // Aura configuration. | 273 // Aura configuration. |
267 std::unique_ptr<SurfaceContextFactory> context_factory_; | 274 std::unique_ptr<SurfaceContextFactory> context_factory_; |
268 std::unique_ptr<WindowTreeHostMus> window_tree_host_; | 275 std::unique_ptr<WindowTreeHostMus> window_tree_host_; |
269 aura::Window* content_; | 276 aura::Window* content_; |
270 std::unique_ptr<wm::FocusController> focus_client_; | 277 std::unique_ptr<wm::FocusController> focus_client_; |
271 std::unique_ptr<MusCaptureClient> capture_client_; | 278 std::unique_ptr<MusCaptureClient> capture_client_; |
272 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_; | 279 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_; |
273 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; | 280 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
274 std::unique_ptr<wm::CursorManager> cursor_manager_; | 281 std::unique_ptr<wm::CursorManager> cursor_manager_; |
275 | 282 |
| 283 // Bitmap management. |
| 284 std::unique_ptr<ui::BitmapUploader> bitmap_uploader_; |
| 285 std::unique_ptr<ui::ViewProp> prop_; |
| 286 |
276 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; | 287 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; |
277 | 288 |
278 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); | 289 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); |
279 }; | 290 }; |
280 | 291 |
281 } // namespace views | 292 } // namespace views |
282 | 293 |
283 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 294 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
OLD | NEW |