| Index: content/browser/renderer_host/offscreen_canvas_surface_impl.h
|
| diff --git a/content/browser/renderer_host/offscreen_canvas_surface_impl.h b/content/browser/renderer_host/offscreen_canvas_surface_impl.h
|
| index 6ab9214688f598d4f8d5cb1e798b6c2972d50b24..9ccc562018e6f54137581f13e640ac7b61072ed3 100644
|
| --- a/content/browser/renderer_host/offscreen_canvas_surface_impl.h
|
| +++ b/content/browser/renderer_host/offscreen_canvas_surface_impl.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_
|
| #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_
|
|
|
| +#include "base/memory/weak_ptr.h"
|
| #include "cc/surfaces/surface_id.h"
|
| #include "cc/surfaces/surface_id_allocator.h"
|
| #include "mojo/public/cpp/bindings/interface_request.h"
|
| @@ -13,7 +14,8 @@
|
|
|
| namespace content {
|
|
|
| -class OffscreenCanvasSurfaceImpl : public blink::mojom::OffscreenCanvasSurface {
|
| +class CONTENT_EXPORT OffscreenCanvasSurfaceImpl
|
| + : public blink::mojom::OffscreenCanvasSurface {
|
| public:
|
| OffscreenCanvasSurfaceImpl();
|
| ~OffscreenCanvasSurfaceImpl() override;
|
| @@ -26,10 +28,17 @@ class OffscreenCanvasSurfaceImpl : public blink::mojom::OffscreenCanvasSurface {
|
| const cc::SurfaceSequence& sequence) override;
|
| void Satisfy(const cc::SurfaceSequence& sequence) override;
|
|
|
| + const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
|
| + base::WeakPtr<OffscreenCanvasSurfaceImpl> GetWeakPtr() {
|
| + return weak_factory_.GetWeakPtr();
|
| + }
|
| +
|
| private:
|
| // Surface-related state
|
| std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
|
| - cc::SurfaceId surface_id_;
|
| + cc::FrameSinkId frame_sink_id_;
|
| +
|
| + base::WeakPtrFactory<OffscreenCanvasSurfaceImpl> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasSurfaceImpl);
|
| };
|
|
|