| 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 21 matching lines...) Expand all Loading... |
| 32 // NativeWidgetMus is created. | 32 // NativeWidgetMus is created. |
| 33 // WindowManagerConnection is a singleton and should be created early on. | 33 // WindowManagerConnection is a singleton and should be created early on. |
| 34 // | 34 // |
| 35 // TODO(sky): this name is now totally confusing. Come up with a better one. | 35 // TODO(sky): this name is now totally confusing. Come up with a better one. |
| 36 class VIEWS_MUS_EXPORT WindowManagerConnection | 36 class VIEWS_MUS_EXPORT WindowManagerConnection |
| 37 : public NON_EXPORTED_BASE(mus::WindowTreeDelegate), | 37 : public NON_EXPORTED_BASE(mus::WindowTreeDelegate), |
| 38 public ScreenMusDelegate { | 38 public ScreenMusDelegate { |
| 39 public: | 39 public: |
| 40 static void Create(mojo::Connector* connector); | 40 static void Create(mojo::Connector* connector); |
| 41 static WindowManagerConnection* Get(); | 41 static WindowManagerConnection* Get(); |
| 42 static bool Exists(); |
| 42 | 43 |
| 43 // Destroys the singleton instance. | 44 // Destroys the singleton instance. |
| 44 static void Reset(); | 45 static void Reset(); |
| 45 | 46 |
| 46 mojo::Connector* connector() { return connector_; } | 47 mojo::Connector* connector() { return connector_; } |
| 47 | 48 |
| 48 mus::Window* NewWindow(const std::map<std::string, | 49 mus::Window* NewWindow(const std::map<std::string, |
| 49 std::vector<uint8_t>>& properties); | 50 std::vector<uint8_t>>& properties); |
| 50 | 51 |
| 51 NativeWidget* CreateNativeWidgetMus( | 52 NativeWidget* CreateNativeWidgetMus( |
| (...skipping 15 matching lines...) Expand all Loading... |
| 67 mojo::Connector* connector_; | 68 mojo::Connector* connector_; |
| 68 scoped_ptr<ScreenMus> screen_; | 69 scoped_ptr<ScreenMus> screen_; |
| 69 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; | 70 scoped_ptr<mus::WindowTreeConnection> window_tree_connection_; |
| 70 | 71 |
| 71 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); | 72 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 } // namespace views | 75 } // namespace views |
| 75 | 76 |
| 76 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ | 77 #endif // UI_VIEWS_MUS_WINDOW_MANAGER_CONNECTION_H_ |
| OLD | NEW |