Chromium Code Reviews| 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 COMPONENTS_MUS_PUBLIC_CPP_WINDOW_SURFACE_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_SURFACE_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_SURFACE_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_SURFACE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 // static | 28 // static |
| 29 static std::unique_ptr<WindowSurface> Create( | 29 static std::unique_ptr<WindowSurface> Create( |
| 30 std::unique_ptr<WindowSurfaceBinding>* surface_binding); | 30 std::unique_ptr<WindowSurfaceBinding>* surface_binding); |
| 31 | 31 |
| 32 ~WindowSurface() override; | 32 ~WindowSurface() override; |
| 33 | 33 |
| 34 // Called to indicate that the current thread has assumed control of this | 34 // Called to indicate that the current thread has assumed control of this |
| 35 // object. | 35 // object. |
| 36 void BindToThread(); | 36 void BindToThread(); |
| 37 | 37 |
| 38 void SubmitCompositorFrame(cc::mojom::CompositorFramePtr frame, | 38 void SubmitCompositorFrame(std::unique_ptr<cc::CompositorFrame> frame, |
|
rjkroege
2016/06/23 19:13:55
my preference would be to not have client code unl
Fady Samuel
2016/06/25 04:31:12
This is a fairly thin wrapper around mojo interfac
| |
| 39 const base::Closure& callback); | 39 const base::Closure& callback); |
| 40 | 40 |
| 41 void set_client(WindowSurfaceClient* client) { client_ = client; } | 41 void set_client(WindowSurfaceClient* client) { client_ = client; } |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 friend class Window; | 44 friend class Window; |
| 45 | 45 |
| 46 WindowSurface(mojo::InterfacePtrInfo<mojom::Surface> surface_info, | 46 WindowSurface(mojo::InterfacePtrInfo<mojom::Surface> surface_info, |
| 47 mojo::InterfaceRequest<mojom::SurfaceClient> client_request); | 47 mojo::InterfaceRequest<mojom::SurfaceClient> client_request); |
| 48 | 48 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 76 | 76 |
| 77 mojo::InterfaceRequest<mojom::Surface> surface_request_; | 77 mojo::InterfaceRequest<mojom::Surface> surface_request_; |
| 78 mojo::InterfacePtrInfo<mojom::SurfaceClient> surface_client_; | 78 mojo::InterfacePtrInfo<mojom::SurfaceClient> surface_client_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(WindowSurfaceBinding); | 80 DISALLOW_COPY_AND_ASSIGN(WindowSurfaceBinding); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace mus | 83 } // namespace mus |
| 84 | 84 |
| 85 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_SURFACE_H_ | 85 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_SURFACE_H_ |
| OLD | NEW |