| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| 6 #define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "mojo/public/cpp/application/application_connection.h" |
| 10 #include "mojo/public/cpp/application/application_delegate.h" |
| 11 #include "mojo/public/cpp/application/application_impl.h" |
| 12 #include "mojo/services/window_manager/interfaces/window_manager.mojom.h" |
| 13 #include "services/window_manager/window_manager_delegate.h" |
| 14 |
| 15 namespace window_manager { |
| 16 |
| 17 // Implements core window manager functionality that could conceivably be shared |
| 18 // across multiple window managers implementing superficially different user |
| 19 // experiences. |
| 20 // A window manager wishing to use this core should create and own an instance |
| 21 // of this object. They may implement the associated ViewManager/WindowManager |
| 22 // delegate interfaces exposed by the view manager, this object provides the |
| 23 // canonical implementation of said interfaces but will call out to the wrapped |
| 24 // instances. |
| 25 // Window manager clients should request a WindowManager service to get a new |
| 26 // native window. |
| 27 class WindowManagerApp : public mojo::ApplicationDelegate, |
| 28 public mojo::InterfaceFactory<mojo::WindowManager> { |
| 29 public: |
| 30 WindowManagerApp(WindowManagerControllerFactory* controller_factory); |
| 31 ~WindowManagerApp() override; |
| 32 |
| 33 // Overridden from ApplicationDelegate: |
| 34 void Initialize(mojo::ApplicationImpl* impl) override; |
| 35 bool ConfigureIncomingConnection( |
| 36 mojo::ApplicationConnection* connection) override; |
| 37 |
| 38 private: |
| 39 // InterfaceFactory<WindowManager>: |
| 40 void Create(mojo::ApplicationConnection* connection, |
| 41 mojo::InterfaceRequest<mojo::WindowManager> request) override; |
| 42 |
| 43 mojo::ApplicationImpl* app_impl_; |
| 44 WindowManagerControllerFactory* controller_factory_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(WindowManagerApp); |
| 47 }; |
| 48 |
| 49 } // namespace window_manager |
| 50 |
| 51 #endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_APP_H_ |
| OLD | NEW |