| 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_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ | 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ |
| 6 #define SERVICES_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ | 6 #define SERVICES_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class ServerWindowSurfaceManager { | 26 class ServerWindowSurfaceManager { |
| 27 public: | 27 public: |
| 28 explicit ServerWindowSurfaceManager(ServerWindow* window); | 28 explicit ServerWindowSurfaceManager(ServerWindow* window); |
| 29 ~ServerWindowSurfaceManager(); | 29 ~ServerWindowSurfaceManager(); |
| 30 | 30 |
| 31 // Returns true if the surfaces from this manager should be drawn. | 31 // Returns true if the surfaces from this manager should be drawn. |
| 32 bool ShouldDraw(); | 32 bool ShouldDraw(); |
| 33 | 33 |
| 34 // Creates a new surface of the specified type, replacing the existing one of | 34 // Creates a new surface of the specified type, replacing the existing one of |
| 35 // the specified type. | 35 // the specified type. |
| 36 void CreateSurface(mojom::SurfaceType surface_type, | 36 void CreateSurface( |
| 37 mojo::InterfaceRequest<mojom::Surface> request, | 37 mojom::SurfaceType surface_type, |
| 38 mojom::SurfaceClientPtr client); | 38 mojo::InterfaceRequest<cc::mojom::MojoCompositorFrameSink> request, |
| 39 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 39 | 40 |
| 40 ServerWindow* window() { return window_; } | 41 ServerWindow* window() { return window_; } |
| 41 | 42 |
| 42 ServerWindowSurface* GetDefaultSurface() const; | 43 ServerWindowSurface* GetDefaultSurface() const; |
| 43 ServerWindowSurface* GetUnderlaySurface() const; | 44 ServerWindowSurface* GetUnderlaySurface() const; |
| 44 ServerWindowSurface* GetSurfaceByType(mojom::SurfaceType type) const; | 45 ServerWindowSurface* GetSurfaceByType(mojom::SurfaceType type) const; |
| 45 bool HasSurfaceOfType(mojom::SurfaceType type) const; | 46 bool HasSurfaceOfType(mojom::SurfaceType type) const; |
| 46 bool HasAnySurface() const; | 47 bool HasAnySurface() const; |
| 47 | 48 |
| 48 cc::SurfaceManager* GetSurfaceManager(); | 49 cc::SurfaceManager* GetSurfaceManager(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 69 // the underlay is not necessarily as big as the window. | 70 // the underlay is not necessarily as big as the window. |
| 70 bool waiting_for_initial_frames_; | 71 bool waiting_for_initial_frames_; |
| 71 | 72 |
| 72 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurfaceManager); | 73 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurfaceManager); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace ws | 76 } // namespace ws |
| 76 } // namespace ui | 77 } // namespace ui |
| 77 | 78 |
| 78 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ | 79 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ |
| OLD | NEW |