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 | |
54 private: | 51 private: |
55 explicit WindowManagerConnection(mojo::Shell* shell); | 52 explicit WindowManagerConnection(mojo::Shell* shell); |
56 ~WindowManagerConnection() override; | 53 ~WindowManagerConnection() override; |
57 | 54 |
58 // mus::WindowTreeDelegate: | 55 // mus::WindowTreeDelegate: |
59 void OnEmbed(mus::Window* root) override; | 56 void OnEmbed(mus::Window* root) override; |
60 void OnConnectionLost(mus::WindowTreeConnection* connection) override; | 57 void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
61 | 58 |
62 // ScreenMusDelegate: | 59 // ScreenMusDelegate: |
63 void OnWindowManagerFrameValuesChanged() override; | 60 void OnWindowManagerFrameValuesChanged() override; |
64 | 61 |
| 62 NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params, |
| 63 internal::NativeWidgetDelegate* delegate); |
65 | 64 |
66 mojo::Shell* shell_; | 65 mojo::Shell* shell_; |
67 scoped_ptr<ScreenMus> screen_; | 66 scoped_ptr<ScreenMus> screen_; |
68 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; | 67 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; |
69 | 68 |
70 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); | 69 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); |
71 }; | 70 }; |
72 | 71 |
73 } // namespace views | 72 } // namespace views |
74 | 73 |
75 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ | 74 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
OLD | NEW |