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 <map> | 10 #include <map> |
(...skipping 29 matching lines...) Expand all Loading... |
40 // . Creates and owns a WindowTreeClient. | 40 // . Creates and owns a WindowTreeClient. |
41 // . Registers itself as the factory for creating NativeWidgets so that a | 41 // . Registers itself as the factory for creating NativeWidgets so that a |
42 // NativeWidgetMus is created. | 42 // NativeWidgetMus is created. |
43 // WindowManagerConnection is a singleton and should be created early on. | 43 // WindowManagerConnection is a singleton and should be created early on. |
44 // | 44 // |
45 // TODO(sky): this name is now totally confusing. Come up with a better one. | 45 // TODO(sky): this name is now totally confusing. Come up with a better one. |
46 class VIEWS_MUS_EXPORT WindowManagerConnection | 46 class VIEWS_MUS_EXPORT WindowManagerConnection |
47 : public NON_EXPORTED_BASE(ui::WindowTreeClientDelegate), | 47 : public NON_EXPORTED_BASE(ui::WindowTreeClientDelegate), |
48 public ScreenMusDelegate { | 48 public ScreenMusDelegate { |
49 public: | 49 public: |
| 50 ~WindowManagerConnection() override; |
| 51 |
50 static std::unique_ptr<WindowManagerConnection> Create( | 52 static std::unique_ptr<WindowManagerConnection> Create( |
51 shell::Connector* connector, | 53 shell::Connector* connector, |
52 const shell::Identity& identity); | 54 const shell::Identity& identity); |
53 static WindowManagerConnection* Get(); | 55 static WindowManagerConnection* Get(); |
54 static bool Exists(); | 56 static bool Exists(); |
55 | 57 |
56 ~WindowManagerConnection() override; | |
57 | |
58 shell::Connector* connector() { return connector_; } | 58 shell::Connector* connector() { return connector_; } |
59 | 59 |
60 ui::Window* NewWindow( | 60 ui::Window* NewWindow( |
61 const std::map<std::string, std::vector<uint8_t>>& properties); | 61 const std::map<std::string, std::vector<uint8_t>>& properties); |
62 | 62 |
63 NativeWidget* CreateNativeWidgetMus( | 63 NativeWidget* CreateNativeWidgetMus( |
64 const std::map<std::string, std::vector<uint8_t>>& properties, | 64 const std::map<std::string, std::vector<uint8_t>>& properties, |
65 const Widget::InitParams& init_params, | 65 const Widget::InitParams& init_params, |
66 internal::NativeWidgetDelegate* delegate); | 66 internal::NativeWidgetDelegate* delegate); |
67 | 67 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Must be empty on destruction. | 99 // Must be empty on destruction. |
100 base::ObserverList<PointerDownWatcher, true> pointer_down_watchers_; | 100 base::ObserverList<PointerDownWatcher, true> pointer_down_watchers_; |
101 base::ObserverList<TouchEventWatcher, true> touch_event_watchers_; | 101 base::ObserverList<TouchEventWatcher, true> touch_event_watchers_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); | 103 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace views | 106 } // namespace views |
107 | 107 |
108 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ | 108 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
OLD | NEW |