| 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_UI_VIEW_MANAGER_SURFACE_MANAGER_H_ |
| 6 #define SERVICES_UI_VIEW_MANAGER_SURFACE_MANAGER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "mojo/services/surfaces/interfaces/surfaces.mojom.h" |
| 10 |
| 11 namespace view_manager { |
| 12 |
| 13 // Manages surfaces on behalf of the view manager. |
| 14 class SurfaceManager { |
| 15 public: |
| 16 explicit SurfaceManager(mojo::SurfacePtr surfaces); |
| 17 ~SurfaceManager(); |
| 18 |
| 19 mojo::SurfaceIdPtr CreateWrappedSurface(mojo::SurfaceId* inner_surface_id); |
| 20 |
| 21 void DestroySurface(mojo::SurfaceIdPtr surface_id); |
| 22 |
| 23 private: |
| 24 void OnSurfaceIdNamespaceAvailable(uint32_t id_namespace); |
| 25 |
| 26 mojo::SurfacePtr surfaces_; |
| 27 uint32_t surface_namespace_; |
| 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); |
| 30 }; |
| 31 |
| 32 } // namespace view_manager |
| 33 |
| 34 #endif // SERVICES_UI_VIEW_MANAGER_SURFACE_MANAGER_H_ |
| OLD | NEW |