| 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 COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_APPLICATION_H_ | 5 #ifndef COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_APPLICATION_H_ |
| 6 #define COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_APPLICATION_H_ | 6 #define COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_APPLICATION_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| 11 #include "components/mus/public/cpp/window_tree_delegate.h" | 11 #include "components/mus/public/cpp/window_tree_delegate.h" |
| 12 #include "components/mus/public/interfaces/view_tree_host.mojom.h" | |
| 13 #include "components/mus/public/interfaces/window_manager.mojom.h" | 12 #include "components/mus/public/interfaces/window_manager.mojom.h" |
| 13 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
| 14 #include "mojo/application/public/cpp/application_delegate.h" | 14 #include "mojo/application/public/cpp/application_delegate.h" |
| 15 #include "mojo/application/public/cpp/interface_factory_impl.h" | 15 #include "mojo/application/public/cpp/interface_factory_impl.h" |
| 16 | 16 |
| 17 class WindowManagerApplication | 17 class WindowManagerApplication |
| 18 : public mojo::ApplicationDelegate, | 18 : public mojo::ApplicationDelegate, |
| 19 public mus::WindowTreeDelegate, | 19 public mus::WindowTreeDelegate, |
| 20 public mojo::InterfaceFactory<mus::mojom::WindowManager> { | 20 public mojo::InterfaceFactory<mus::mojom::WindowManager> { |
| 21 public: | 21 public: |
| 22 WindowManagerApplication(); | 22 WindowManagerApplication(); |
| 23 ~WindowManagerApplication() override; | 23 ~WindowManagerApplication() override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 42 mojo::ApplicationConnection* connection, | 42 mojo::ApplicationConnection* connection, |
| 43 mojo::InterfaceRequest<mus::mojom::WindowManager> request) override; | 43 mojo::InterfaceRequest<mus::mojom::WindowManager> request) override; |
| 44 | 44 |
| 45 // Sets up the window containers used for z-space management. | 45 // Sets up the window containers used for z-space management. |
| 46 void CreateContainers(); | 46 void CreateContainers(); |
| 47 | 47 |
| 48 // nullptr until the Mus connection is established via OnEmbed(). | 48 // nullptr until the Mus connection is established via OnEmbed(). |
| 49 mus::Window* root_; | 49 mus::Window* root_; |
| 50 int window_count_; | 50 int window_count_; |
| 51 | 51 |
| 52 mojo::ViewTreeHostPtr host_; | 52 mus::mojom::WindowTreeHostPtr host_; |
| 53 ScopedVector<mojo::InterfaceRequest<mus::mojom::WindowManager>> requests_; | 53 ScopedVector<mojo::InterfaceRequest<mus::mojom::WindowManager>> requests_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 55 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 #endif // COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_APPLICATION_H_ | 58 #endif // COMPONENTS_MUS_EXAMPLE_WM_WINDOW_MANAGER_APPLICATION_H_ |
| OLD | NEW |