Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: content/browser/renderer_host/offscreen_canvas_surface_impl.h

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 cf85fe5aec7f25ef1c25fa54007688df47fc2643..368603123c0eeeb61f49de798b07974eb8a26508 100644
--- a/content/browser/renderer_host/offscreen_canvas_surface_impl.h
+++ b/content/browser/renderer_host/offscreen_canvas_surface_impl.h
@@ -11,7 +11,6 @@
#include "cc/surfaces/surface_id_allocator.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/string.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
#include "third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom.h"
namespace content {
@@ -19,8 +18,10 @@ namespace content {
class OffscreenCanvasSurfaceImpl : public blink::mojom::OffscreenCanvasSurface,
public cc::SurfaceFactoryClient {
public:
- static void Create(
- mojo::InterfaceRequest<blink::mojom::OffscreenCanvasSurface> request);
+ OffscreenCanvasSurfaceImpl();
+ ~OffscreenCanvasSurfaceImpl() override;
+
+ static void Create(blink::mojom::OffscreenCanvasSurfaceRequest request);
// blink::mojom::OffscreenCanvasSurface implementation.
void GetSurfaceId(const GetSurfaceIdCallback& callback) override;
@@ -36,17 +37,11 @@ class OffscreenCanvasSurfaceImpl : public blink::mojom::OffscreenCanvasSurface,
void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
private:
- ~OffscreenCanvasSurfaceImpl() override;
- explicit OffscreenCanvasSurfaceImpl(
- mojo::InterfaceRequest<blink::mojom::OffscreenCanvasSurface> request);
-
// Surface-related state
std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
cc::SurfaceId surface_id_;
std::unique_ptr<cc::SurfaceFactory> surface_factory_;
- mojo::StrongBinding<blink::mojom::OffscreenCanvasSurface> binding_;
-
DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasSurfaceImpl);
};

Powered by Google App Engine
This is Rietveld 408576698