| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/mus/public/cpp/window_tree_delegate.h" | 9 #include "components/mus/public/cpp/window_tree_delegate.h" |
| 10 #include "components/mus/public/interfaces/window_manager.mojom.h" | 10 #include "components/mus/public/interfaces/window_manager.mojom.h" |
| 11 | 11 |
| 12 namespace mojo { | 12 namespace mojo { |
| 13 class ApplicationImpl; | 13 class ApplicationImpl; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 namespace mojo { | 17 namespace mojo { |
| 18 class UIInit; | 18 class UIInit; |
| 19 } | 19 } |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace views { | |
| 23 class NativeWidget; | |
| 24 namespace internal { | |
| 25 class NativeWidgetDelegate; | |
| 26 } | |
| 27 | |
| 28 // Establishes a connection to the window manager for use by views within an | 22 // Establishes a connection to the window manager for use by views within an |
| 29 // application, and performs Aura initialization. | 23 // application, and performs Aura initialization. |
| 30 class WindowManagerConnection : public mus::WindowTreeDelegate { | 24 class WindowManagerConnection : public mus::WindowTreeDelegate { |
| 31 public: | 25 public: |
| 32 static void Create(mus::mojom::WindowManagerPtr window_manager, | 26 static void Create(mus::mojom::WindowManagerPtr window_manager, |
| 33 mojo::ApplicationImpl* app); | 27 mojo::ApplicationImpl* app); |
| 34 static WindowManagerConnection* Get(); | 28 static WindowManagerConnection* Get(); |
| 35 | 29 |
| 36 mus::Window* NewWindow(const std::map<std::string, | 30 mus::Window* NewWindow(const std::map<std::string, |
| 37 std::vector<uint8_t>>& properties); | 31 std::vector<uint8_t>>& properties); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 54 mojo::ApplicationImpl* app_; | 48 mojo::ApplicationImpl* app_; |
| 55 mus::mojom::WindowManagerPtr window_manager_; | 49 mus::mojom::WindowManagerPtr window_manager_; |
| 56 scoped_ptr<ui::mojo::UIInit> ui_init_; | 50 scoped_ptr<ui::mojo::UIInit> ui_init_; |
| 57 | 51 |
| 58 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); | 52 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); |
| 59 }; | 53 }; |
| 60 | 54 |
| 61 } // namespace views | 55 } // namespace views |
| 62 | 56 |
| 63 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ | 57 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
| OLD | NEW |