| 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_IMPL_H_ | 5 #ifndef SERVICES_GFX_COMPOSITOR_COMPOSITOR_IMPL_H_ |
| 6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_IMPL_H_ | 6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "mojo/common/strong_binding_set.h" | 9 #include "mojo/common/strong_binding_set.h" |
| 10 #include "mojo/services/gfx/composition/interfaces/compositor.mojom.h" | 10 #include "mojo/services/gfx/composition/interfaces/compositor.mojom.h" |
| 11 #include "services/gfx/compositor/compositor_engine.h" | 11 #include "services/gfx/compositor/compositor_engine.h" |
| 12 | 12 |
| 13 namespace compositor { | 13 namespace compositor { |
| 14 | 14 |
| 15 // Compositor interface implementation. | 15 // Compositor interface implementation. |
| 16 class CompositorImpl : public mojo::gfx::composition::Compositor { | 16 class CompositorImpl : public mojo::gfx::composition::Compositor { |
| 17 public: | 17 public: |
| 18 explicit CompositorImpl(CompositorEngine* engine); | 18 explicit CompositorImpl(CompositorEngine* engine); |
| 19 ~CompositorImpl() override; | 19 ~CompositorImpl() override; |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 // |Compositor|: | 22 // |Compositor|: |
| 23 void CreateScene( | 23 void CreateScene( |
| 24 mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene_request, | 24 mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene_request, |
| 25 const mojo::String& label, | 25 const mojo::String& label, |
| 26 const CreateSceneCallback& callback) override; | 26 const CreateSceneCallback& callback) override; |
| 27 void CreateRenderer( | 27 void CreateRenderer( |
| 28 mojo::ContextProviderPtr context_provider, | 28 mojo::InterfaceHandle<mojo::ContextProvider> context_provider, |
| 29 mojo::InterfaceRequest<mojo::gfx::composition::Renderer> renderer_request, | 29 mojo::InterfaceRequest<mojo::gfx::composition::Renderer> renderer_request, |
| 30 const mojo::String& label) override; | 30 const mojo::String& label) override; |
| 31 | 31 |
| 32 CompositorEngine* engine_; | 32 CompositorEngine* engine_; |
| 33 | 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 34 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace compositor | 37 } // namespace compositor |
| 38 | 38 |
| 39 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_IMPL_H_ | 39 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_IMPL_H_ |
| OLD | NEW |