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