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_WINDOW_MANAGER_CONNECTION_H_ | 5 #ifndef UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
6 #define UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ | 6 #define UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "components/mus/public/cpp/window_tree_delegate.h" | 12 #include "components/mus/public/cpp/window_tree_delegate.h" |
13 #include "components/mus/public/interfaces/window_manager.mojom.h" | 13 #include "components/mus/public/interfaces/window_manager.mojom.h" |
14 #include "ui/views/mus/mus_export.h" | 14 #include "ui/views/mus/mus_export.h" |
15 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 class ApplicationImpl; | 18 class ApplicationImpl; |
19 } | 19 } |
20 | 20 |
21 namespace ui { | |
22 namespace mojo { | |
23 class UIInit; | |
24 } | |
25 } | |
26 | |
27 namespace views { | 21 namespace views { |
28 class NativeWidget; | 22 class NativeWidget; |
| 23 class ScreenMus; |
29 namespace internal { | 24 namespace internal { |
30 class NativeWidgetDelegate; | 25 class NativeWidgetDelegate; |
31 } | 26 } |
32 | 27 |
33 // Establishes a connection to the window manager for use by views within an | 28 // Establishes a connection to the window manager for use by views within an |
34 // application, and performs Aura initialization. | 29 // application, and performs Aura initialization. |
35 class VIEWS_MUS_EXPORT WindowManagerConnection | 30 class VIEWS_MUS_EXPORT WindowManagerConnection |
36 : public NON_EXPORTED_BASE(mus::WindowTreeDelegate) { | 31 : public NON_EXPORTED_BASE(mus::WindowTreeDelegate) { |
37 public: | 32 public: |
38 static void Create(mojo::ApplicationImpl* app); | 33 static void Create(mojo::ApplicationImpl* app); |
(...skipping 14 matching lines...) Expand all Loading... |
53 | 48 |
54 // mus::WindowTreeDelegate: | 49 // mus::WindowTreeDelegate: |
55 void OnEmbed(mus::Window* root) override; | 50 void OnEmbed(mus::Window* root) override; |
56 void OnConnectionLost(mus::WindowTreeConnection* connection) override; | 51 void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
57 | 52 |
58 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, | 53 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, |
59 internal::NativeWidgetDelegate* delegate); | 54 internal::NativeWidgetDelegate* delegate); |
60 | 55 |
61 mojo::ApplicationImpl* app_; | 56 mojo::ApplicationImpl* app_; |
62 mus::mojom::WindowManagerPtr window_manager_; | 57 mus::mojom::WindowManagerPtr window_manager_; |
63 scoped_ptr<ui::mojo::UIInit> ui_init_; | 58 scoped_ptr<ScreenMus> screen_; |
64 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; | 59 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; |
65 | 60 |
66 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); | 61 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); |
67 }; | 62 }; |
68 | 63 |
69 } // namespace views | 64 } // namespace views |
70 | 65 |
71 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ | 66 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
OLD | NEW |