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

Side by Side Diff: content/browser/renderer_host/offscreen_canvas_surface_impl.h

Issue 2479563005: Create manager to track OffscreenCanvasSurfaceImpl instances (Closed)
Patch Set: rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_
7 7
8 #include "cc/surfaces/surface_id.h" 8 #include "cc/surfaces/surface_id.h"
9 #include "cc/surfaces/surface_id_allocator.h" 9 #include "cc/surfaces/surface_id_allocator.h"
10 #include "mojo/public/cpp/bindings/interface_request.h" 10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "mojo/public/cpp/bindings/string.h" 11 #include "mojo/public/cpp/bindings/string.h"
12 #include "third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_c anvas_surface.mojom.h" 12 #include "third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_c anvas_surface.mojom.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class OffscreenCanvasSurfaceImpl : public blink::mojom::OffscreenCanvasSurface { 16 class CONTENT_EXPORT OffscreenCanvasSurfaceImpl
17 : public blink::mojom::OffscreenCanvasSurface {
17 public: 18 public:
18 OffscreenCanvasSurfaceImpl(); 19 OffscreenCanvasSurfaceImpl();
19 ~OffscreenCanvasSurfaceImpl() override; 20 ~OffscreenCanvasSurfaceImpl() override;
20 21
21 static void Create(blink::mojom::OffscreenCanvasSurfaceRequest request); 22 static void Create(blink::mojom::OffscreenCanvasSurfaceRequest request);
22 23
23 // blink::mojom::OffscreenCanvasSurface implementation. 24 // blink::mojom::OffscreenCanvasSurface implementation.
24 void GetSurfaceId(const GetSurfaceIdCallback& callback) override; 25 void GetSurfaceId(const GetSurfaceIdCallback& callback) override;
25 void Require(const cc::SurfaceId& surface_id, 26 void Require(const cc::SurfaceId& surface_id,
26 const cc::SurfaceSequence& sequence) override; 27 const cc::SurfaceSequence& sequence) override;
27 void Satisfy(const cc::SurfaceSequence& sequence) override; 28 void Satisfy(const cc::SurfaceSequence& sequence) override;
28 29
30 const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
31
29 private: 32 private:
30 // Surface-related state 33 // Surface-related state
31 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; 34 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
32 cc::SurfaceId surface_id_; 35 cc::FrameSinkId frame_sink_id_;
33 36
34 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasSurfaceImpl); 37 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasSurfaceImpl);
35 }; 38 };
36 39
37 } // namespace content 40 } // namespace content
38 41
39 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_ 42 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_SURFACE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/offscreen_canvas_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698