| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 MOJO_SERVICES_SURFACES_SURFACES_SERVICE_IMPL_H_ | |
| 6 #define MOJO_SERVICES_SURFACES_SURFACES_SERVICE_IMPL_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h" | |
| 10 #include "mojo/services/surfaces/surfaces_impl.h" | |
| 11 | |
| 12 namespace cc { | |
| 13 class SurfaceManager; | |
| 14 } | |
| 15 | |
| 16 namespace mojo { | |
| 17 | |
| 18 class SurfacesServiceImpl : public InterfaceImpl<SurfacesService> { | |
| 19 public: | |
| 20 // The instances pointed to by |manager|, |next_id_namespace| and |client| are | |
| 21 // owned by the caller and must outlive the SurfacesServiceImpl instance. | |
| 22 SurfacesServiceImpl(cc::SurfaceManager* manager, | |
| 23 uint32_t* next_id_namespace, | |
| 24 SurfacesImpl::Client* client); | |
| 25 ~SurfacesServiceImpl() override; | |
| 26 | |
| 27 // InterfaceImpl<SurfacesService> implementation. | |
| 28 void CreateSurfaceConnection( | |
| 29 const mojo::Callback<void(mojo::SurfacePtr, uint32_t)>& callback) | |
| 30 override; | |
| 31 | |
| 32 private: | |
| 33 cc::SurfaceManager* manager_; | |
| 34 uint32_t* next_id_namespace_; | |
| 35 SurfacesImpl::Client* client_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceImpl); | |
| 38 }; | |
| 39 | |
| 40 } // namespace mojo | |
| 41 | |
| 42 #endif // MOJO_SERVICES_SURFACES_SURFACES_SERVICE_IMPL_H_ | |
| OLD | NEW |