| 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 SERVICES_GFX_COMPOSITOR_COMPOSITOR_APP_H_ | 5 #ifndef SERVICES_GFX_COMPOSITOR_COMPOSITOR_APP_H_ |
| 6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_APP_H_ | 6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_APP_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "mojo/common/strong_binding_set.h" | 11 #include "mojo/common/strong_binding_set.h" |
| 13 #include "mojo/common/tracing_impl.h" | 12 #include "mojo/common/tracing_impl.h" |
| 14 #include "mojo/public/cpp/application/application_delegate.h" | 13 #include "mojo/public/cpp/application/application_impl_base.h" |
| 15 #include "mojo/services/gfx/composition/interfaces/compositor.mojom.h" | 14 #include "mojo/services/gfx/composition/interfaces/compositor.mojom.h" |
| 16 #include "services/gfx/compositor/compositor_engine.h" | 15 #include "services/gfx/compositor/compositor_engine.h" |
| 17 | 16 |
| 18 namespace compositor { | 17 namespace compositor { |
| 19 | 18 |
| 20 // Compositor application entry point. | 19 // Compositor application entry point. |
| 21 class CompositorApp : public mojo::ApplicationDelegate { | 20 class CompositorApp : public mojo::ApplicationImplBase { |
| 22 public: | 21 public: |
| 23 CompositorApp(); | 22 CompositorApp(); |
| 24 ~CompositorApp() override; | 23 ~CompositorApp() override; |
| 25 | 24 |
| 26 private: | 25 private: |
| 27 // |ApplicationDelegate|: | 26 // |ApplicationImplBase|: |
| 28 void Initialize(mojo::ApplicationImpl* app_impl) override; | 27 void OnInitialize() override; |
| 29 bool ConfigureIncomingConnection( | 28 bool OnAcceptConnection( |
| 30 mojo::ServiceProviderImpl* service_provider_impl) override; | 29 mojo::ServiceProviderImpl* service_provider_impl) override; |
| 31 | 30 |
| 32 mojo::ApplicationImpl* app_impl_; | |
| 33 mojo::TracingImpl tracing_; | 31 mojo::TracingImpl tracing_; |
| 34 | 32 |
| 35 mojo::StrongBindingSet<mojo::gfx::composition::Compositor> | 33 mojo::StrongBindingSet<mojo::gfx::composition::Compositor> |
| 36 compositor_bindings_; | 34 compositor_bindings_; |
| 37 std::unique_ptr<CompositorEngine> engine_; | 35 std::unique_ptr<CompositorEngine> engine_; |
| 38 | 36 |
| 39 DISALLOW_COPY_AND_ASSIGN(CompositorApp); | 37 DISALLOW_COPY_AND_ASSIGN(CompositorApp); |
| 40 }; | 38 }; |
| 41 | 39 |
| 42 } // namespace compositor | 40 } // namespace compositor |
| 43 | 41 |
| 44 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_APP_H_ | 42 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_APP_H_ |
| OLD | NEW |