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" |
(...skipping 30 matching lines...) Expand all Loading... |
41 static WindowManagerConnection* Get(); | 41 static WindowManagerConnection* Get(); |
42 | 42 |
43 // Destroys the singleton instance. | 43 // Destroys the singleton instance. |
44 static void Reset(); | 44 static void Reset(); |
45 | 45 |
46 mojo::Shell* shell() { return shell_; } | 46 mojo::Shell* shell() { return shell_; } |
47 | 47 |
48 mus::Window* NewWindow(const std::map<std::string, | 48 mus::Window* NewWindow(const std::map<std::string, |
49 std::vector<uint8_t>>& properties); | 49 std::vector<uint8_t>>& properties); |
50 | 50 |
| 51 NativeWidget* CreateNativeWidgetMus(const Widget::InitParams& init_params, |
| 52 internal::NativeWidgetDelegate* delegate); |
| 53 |
51 private: | 54 private: |
52 explicit WindowManagerConnection(mojo::Shell* shell); | 55 explicit WindowManagerConnection(mojo::Shell* shell); |
53 ~WindowManagerConnection() override; | 56 ~WindowManagerConnection() override; |
54 | 57 |
55 // mus::WindowTreeDelegate: | 58 // mus::WindowTreeDelegate: |
56 void OnEmbed(mus::Window* root) override; | 59 void OnEmbed(mus::Window* root) override; |
57 void OnConnectionLost(mus::WindowTreeConnection* connection) override; | 60 void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
58 | 61 |
59 // ScreenMusDelegate: | 62 // ScreenMusDelegate: |
60 void OnWindowManagerFrameValuesChanged() override; | 63 void OnWindowManagerFrameValuesChanged() override; |
61 | 64 |
62 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, | |
63 internal::NativeWidgetDelegate* delegate); | |
64 | 65 |
65 mojo::Shell* shell_; | 66 mojo::Shell* shell_; |
66 scoped_ptr<ScreenMus> screen_; | 67 scoped_ptr<ScreenMus> screen_; |
67 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; | 68 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; |
68 | 69 |
69 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); | 70 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); |
70 }; | 71 }; |
71 | 72 |
72 } // namespace views | 73 } // namespace views |
73 | 74 |
74 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ | 75 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
OLD | NEW |