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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 namespace ui { | 35 namespace ui { |
36 class Window; | 36 class Window; |
37 class WindowTreeClient; | 37 class WindowTreeClient; |
38 namespace mojom { | 38 namespace mojom { |
39 enum class Cursor; | 39 enum class Cursor; |
40 enum class EventResult; | 40 enum class EventResult; |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
44 namespace shell { | |
45 class Connector; | |
46 } | |
47 | |
48 namespace ui { | 44 namespace ui { |
49 class Event; | 45 class Event; |
50 } | 46 } |
51 | 47 |
52 namespace wm { | 48 namespace wm { |
53 class CursorManager; | 49 class CursorManager; |
54 class FocusController; | 50 class FocusController; |
55 } | 51 } |
56 | 52 |
57 namespace views { | 53 namespace views { |
58 class SurfaceContextFactory; | 54 class SurfaceContextFactory; |
59 class WidgetDelegate; | 55 class WidgetDelegate; |
60 | 56 |
61 // An implementation of NativeWidget that binds to a ui::Window. Because Aura | 57 // An implementation of NativeWidget that binds to a ui::Window. Because Aura |
62 // is used extensively within Views code, this code uses aura and binds to the | 58 // is used extensively within Views code, this code uses aura and binds to the |
63 // ui::Window via a Mus-specific aura::WindowTreeHost impl. Because the root | 59 // ui::Window via a Mus-specific aura::WindowTreeHost impl. Because the root |
64 // aura::Window in a hierarchy is created without a delegate by the | 60 // aura::Window in a hierarchy is created without a delegate by the |
65 // aura::WindowTreeHost, we must create a child aura::Window in this class | 61 // aura::WindowTreeHost, we must create a child aura::Window in this class |
66 // (content_) and attach it to the root. | 62 // (content_) and attach it to the root. |
67 class VIEWS_MUS_EXPORT NativeWidgetMus | 63 class VIEWS_MUS_EXPORT NativeWidgetMus |
68 : public internal::NativeWidgetPrivate, | 64 : public internal::NativeWidgetPrivate, |
69 public aura::WindowDelegate, | 65 public aura::WindowDelegate, |
70 public aura::WindowTreeHostObserver, | 66 public aura::WindowTreeHostObserver, |
71 public NON_EXPORTED_BASE(ui::InputEventHandler) { | 67 public NON_EXPORTED_BASE(ui::InputEventHandler) { |
72 public: | 68 public: |
73 NativeWidgetMus(internal::NativeWidgetDelegate* delegate, | 69 NativeWidgetMus(internal::NativeWidgetDelegate* delegate, |
74 shell::Connector* connector, | |
75 ui::Window* window, | 70 ui::Window* window, |
76 ui::mojom::SurfaceType surface_type); | 71 ui::mojom::SurfaceType surface_type); |
77 ~NativeWidgetMus() override; | 72 ~NativeWidgetMus() override; |
78 | 73 |
79 // Configures the set of properties supplied to the window manager when | 74 // Configures the set of properties supplied to the window manager when |
80 // creating a new Window for a Widget. | 75 // creating a new Window for a Widget. |
81 static void ConfigurePropertiesForNewWindow( | 76 static void ConfigurePropertiesForNewWindow( |
82 const Widget::InitParams& init_params, | 77 const Widget::InitParams& init_params, |
83 std::map<std::string, std::vector<uint8_t>>* properties); | 78 std::map<std::string, std::vector<uint8_t>>* properties); |
84 | 79 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 std::unique_ptr<wm::CursorManager> cursor_manager_; | 274 std::unique_ptr<wm::CursorManager> cursor_manager_; |
280 | 275 |
281 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; | 276 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; |
282 | 277 |
283 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); | 278 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); |
284 }; | 279 }; |
285 | 280 |
286 } // namespace views | 281 } // namespace views |
287 | 282 |
288 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ | 283 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ |
OLD | NEW |