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