| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MASH_WM_ROOT_WINDOW_CONTROLLER_H_ | 5 #ifndef MASH_WM_ROOT_WINDOW_CONTROLLER_H_ |
| 6 #define MASH_WM_ROOT_WINDOW_CONTROLLER_H_ | 6 #define MASH_WM_ROOT_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "components/mus/public/cpp/window_observer.h" | 8 #include "components/mus/public/cpp/window_observer.h" |
| 9 #include "components/mus/public/cpp/window_tree_delegate.h" | 9 #include "components/mus/public/cpp/window_tree_delegate.h" |
| 10 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" | 10 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class WindowManager; | 28 class WindowManager; |
| 29 class WindowManagerApplication; | 29 class WindowManagerApplication; |
| 30 | 30 |
| 31 // RootWindowController manages the windows and state for a single display. | 31 // RootWindowController manages the windows and state for a single display. |
| 32 // | 32 // |
| 33 // RootWindowController deletes itself when the root mus::Window is destroyed. | 33 // RootWindowController deletes itself when the root mus::Window is destroyed. |
| 34 // You can trigger deletion explicitly by way of Destroy(). | 34 // You can trigger deletion explicitly by way of Destroy(). |
| 35 class RootWindowController : public mus::WindowObserver, | 35 class RootWindowController : public mus::WindowObserver, |
| 36 public mus::WindowTreeDelegate { | 36 public mus::WindowTreeDelegate { |
| 37 public: | 37 public: |
| 38 static RootWindowController* CreateUsingWindowTreeHost( | |
| 39 WindowManagerApplication* app); | |
| 40 static RootWindowController* CreateFromDisplay( | 38 static RootWindowController* CreateFromDisplay( |
| 41 WindowManagerApplication* app, | 39 WindowManagerApplication* app, |
| 42 mus::mojom::DisplayPtr display, | 40 mus::mojom::DisplayPtr display, |
| 43 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request); | 41 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request); |
| 44 | 42 |
| 45 // Deletes this. | 43 // Deletes this. |
| 46 void Destroy(); | 44 void Destroy(); |
| 47 | 45 |
| 48 mojo::Connector* GetConnector(); | 46 mojo::Connector* GetConnector(); |
| 49 | 47 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 WindowManagerApplication* app_; | 81 WindowManagerApplication* app_; |
| 84 mus::Window* root_; | 82 mus::Window* root_; |
| 85 int window_count_; | 83 int window_count_; |
| 86 | 84 |
| 87 scoped_ptr<WindowManager> window_manager_; | 85 scoped_ptr<WindowManager> window_manager_; |
| 88 | 86 |
| 89 std::map<mus::Window*, scoped_ptr<LayoutManager>> layout_manager_; | 87 std::map<mus::Window*, scoped_ptr<LayoutManager>> layout_manager_; |
| 90 | 88 |
| 91 scoped_ptr<ShadowController> shadow_controller_; | 89 scoped_ptr<ShadowController> shadow_controller_; |
| 92 | 90 |
| 93 mus::mojom::WindowTreeHostPtr window_tree_host_; | |
| 94 | |
| 95 mus::mojom::DisplayPtr display_; | 91 mus::mojom::DisplayPtr display_; |
| 96 | 92 |
| 97 DISALLOW_COPY_AND_ASSIGN(RootWindowController); | 93 DISALLOW_COPY_AND_ASSIGN(RootWindowController); |
| 98 }; | 94 }; |
| 99 | 95 |
| 100 } // namespace wm | 96 } // namespace wm |
| 101 } // namespace mash | 97 } // namespace mash |
| 102 | 98 |
| 103 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_ | 99 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |