Index: mojo/cc/output_surface_mojo.h |
diff --git a/mojo/cc/output_surface_mojo.h b/mojo/cc/output_surface_mojo.h |
index 149a7c1dda8a87c23fe353ab46fc7ace5bcf092b..e6da2a041d26be81338969c9998ebabe083bf564 100644 |
--- a/mojo/cc/output_surface_mojo.h |
+++ b/mojo/cc/output_surface_mojo.h |
@@ -8,45 +8,34 @@ |
#include "base/macros.h" |
#include "cc/output/output_surface.h" |
#include "cc/surfaces/surface_id.h" |
-#include "components/view_manager/public/interfaces/surfaces.mojom.h" |
+#include "components/view_manager/public/cpp/surface.h" |
+#include "components/view_manager/public/cpp/surface_client.h" |
#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" |
-namespace mojo { |
- |
-class OutputSurfaceMojoClient { |
- public: |
- virtual ~OutputSurfaceMojoClient() {} |
+namespace uip { |
+class Surface; |
+} |
- virtual void DidCreateSurface(cc::SurfaceId id) = 0; |
-}; |
+namespace mojo { |
class OutputSurfaceMojo : public cc::OutputSurface, |
- public mojo::ResourceReturner { |
+ public uip::SurfaceClient { |
public: |
- OutputSurfaceMojo(OutputSurfaceMojoClient* client, |
- const scoped_refptr<cc::ContextProvider>& context_provider, |
- ScopedMessagePipeHandle surface_handle); |
- |
- // mojo::ResourceReturner implementation. |
- void ReturnResources(mojo::Array<ReturnedResourcePtr>) override; |
+ OutputSurfaceMojo(const scoped_refptr<cc::ContextProvider>& context_provider, |
+ scoped_ptr<uip::Surface> surface); |
+ ~OutputSurfaceMojo() override; |
// cc::OutputSurface implementation. |
void SwapBuffers(cc::CompositorFrame* frame) override; |
bool BindToClient(cc::OutputSurfaceClient* client) override; |
- protected: |
- ~OutputSurfaceMojo() override; |
- |
private: |
- void SetIdNamespace(uint32_t id_namespace); |
- |
- OutputSurfaceMojoClient* output_surface_mojo_client_; |
- ScopedMessagePipeHandle surface_handle_; |
- SurfacePtr surface_; |
- uint32_t id_namespace_; |
- uint32_t local_id_; |
- gfx::Size surface_size_; |
- mojo::Binding<mojo::ResourceReturner> binding_; |
+ // uip::SurfaceObserver implementation: |
+ void OnResourcesReturned( |
+ uip::Surface* surface, |
+ mojo::Array<mojo::ReturnedResourcePtr> resources) override; |
+ |
+ scoped_ptr<uip::Surface> surface_; |
DISALLOW_COPY_AND_ASSIGN(OutputSurfaceMojo); |
}; |