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_GFX_COMPOSITOR_COMPOSITOR_APP_H_ |
| 6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_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/gfx/composition/interfaces/compositor.mojom.h" |
| 16 #include "services/gfx/compositor/compositor_engine.h" |
| 17 |
| 18 namespace compositor { |
| 19 |
| 20 // Compositor application entry point. |
| 21 class CompositorApp |
| 22 : public mojo::ApplicationDelegate, |
| 23 public mojo::InterfaceFactory<mojo::gfx::composition::Compositor> { |
| 24 public: |
| 25 CompositorApp(); |
| 26 ~CompositorApp() 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<Compositor>|: |
| 35 void Create(mojo::ApplicationConnection* connection, |
| 36 mojo::InterfaceRequest<mojo::gfx::composition::Compositor> |
| 37 request) override; |
| 38 |
| 39 mojo::ApplicationImpl* app_impl_; |
| 40 mojo::TracingImpl tracing_; |
| 41 |
| 42 mojo::StrongBindingSet<mojo::gfx::composition::Compositor> |
| 43 compositor_bindings_; |
| 44 std::unique_ptr<CompositorEngine> engine_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(CompositorApp); |
| 47 }; |
| 48 |
| 49 } // namespace compositor |
| 50 |
| 51 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_APP_H_ |
OLD | NEW |