| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_ |
| 6 #define SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "mojo/common/strong_binding_set.h" |
| 13 #include "mojo/common/tracing_impl.h" |
| 14 #include "mojo/public/cpp/application/application_delegate.h" |
| 15 #include "mojo/services/ui/views/interfaces/view_manager.mojom.h" |
| 16 #include "services/ui/view_manager/surface_manager.h" |
| 17 #include "services/ui/view_manager/view_registry.h" |
| 18 |
| 19 namespace view_manager { |
| 20 |
| 21 // View manager application entry point. |
| 22 class ViewManagerApp : public mojo::ApplicationDelegate, |
| 23 public mojo::InterfaceFactory<mojo::ui::ViewManager> { |
| 24 public: |
| 25 ViewManagerApp(); |
| 26 ~ViewManagerApp() override; |
| 27 |
| 28 private: |
| 29 // |ApplicationDelegate|: |
| 30 void Initialize(mojo::ApplicationImpl* app_impl) override; |
| 31 bool ConfigureIncomingConnection( |
| 32 mojo::ApplicationConnection* connection) override; |
| 33 |
| 34 // |InterfaceFactory<ViewManager>|: |
| 35 void Create(mojo::ApplicationConnection* connection, |
| 36 mojo::InterfaceRequest<mojo::ui::ViewManager> request) override; |
| 37 |
| 38 mojo::ApplicationImpl* app_impl_; |
| 39 mojo::TracingImpl tracing_; |
| 40 |
| 41 mojo::StrongBindingSet<mojo::ui::ViewManager> view_managers; |
| 42 std::unique_ptr<ViewRegistry> registry_; |
| 43 std::unique_ptr<SurfaceManager> surface_manager_; // must come after registry |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp); |
| 46 }; |
| 47 |
| 48 } // namespace view_manager |
| 49 |
| 50 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_ |
| OLD | NEW |