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_SURFACES_DISPLAY_FACTORY_IMPL_H_ |
| 6 #define SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_ |
| 7 |
| 8 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 9 #include "mojo/services/surfaces/display_impl.h" |
| 10 #include "third_party/mojo_services/src/surfaces/public/interfaces/display.mojom
.h" |
| 11 |
| 12 namespace cc { |
| 13 class SurfaceManager; |
| 14 } |
| 15 |
| 16 namespace surfaces { |
| 17 class SurfacesScheduler; |
| 18 |
| 19 class DisplayFactoryImpl : public mojo::DisplayFactory { |
| 20 public: |
| 21 DisplayFactoryImpl(cc::SurfaceManager* manager, |
| 22 uint32_t id_namespace, |
| 23 SurfacesScheduler* scheduler, |
| 24 mojo::InterfaceRequest<mojo::DisplayFactory> request); |
| 25 ~DisplayFactoryImpl() override; |
| 26 |
| 27 private: |
| 28 // mojo::DisplayFactory implementation. |
| 29 void Create(mojo::ContextProviderPtr context_provider, |
| 30 mojo::ResourceReturnerPtr returner, |
| 31 mojo::InterfaceRequest<mojo::Display> display_request) override; |
| 32 |
| 33 // We use one ID namespace for all DisplayImpls since the ID is used only by |
| 34 // cc and not exposed through mojom. |
| 35 uint32_t id_namespace_; |
| 36 uint32_t next_local_id_; |
| 37 SurfacesScheduler* scheduler_; |
| 38 cc::SurfaceManager* manager_; |
| 39 mojo::StrongBinding<mojo::DisplayFactory> binding_; |
| 40 }; |
| 41 |
| 42 } // namespace surfaces |
| 43 |
| 44 #endif // SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_ |
OLD | NEW |