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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h

Issue 2588053003: Make OffscreenCanvas resizable (Closed)
Patch Set: fix Created 3 years, 12 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 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 CanvasSurfaceLayerBridge_h 5 #ifndef CanvasSurfaceLayerBridge_h
6 #define CanvasSurfaceLayerBridge_h 6 #define CanvasSurfaceLayerBridge_h
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "cc/surfaces/surface_id.h" 10 #include "cc/surfaces/surface_id.h"
11 #include "cc/surfaces/surface_reference_factory.h" 11 #include "cc/surfaces/surface_reference_factory.h"
12 #include "mojo/public/cpp/bindings/binding.h" 12 #include "mojo/public/cpp/bindings/binding.h"
13 #include "platform/PlatformExport.h" 13 #include "platform/PlatformExport.h"
14 #include "public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom -blink.h" 14 #include "public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom -blink.h"
15 #include <memory> 15 #include <memory>
16 16
17 namespace cc { 17 namespace cc {
18 class Layer; 18 class Layer;
19 } // namespace cc 19 } // namespace cc
20 20
21 namespace blink { 21 namespace blink {
22 22
23 class WebLayer; 23 class WebLayer;
24 24
25 class PLATFORM_EXPORT CanvasSurfaceLayerBridgeObserver { 25 class PLATFORM_EXPORT CanvasSurfaceLayerBridgeObserver {
26 public: 26 public:
27 CanvasSurfaceLayerBridgeObserver() {} 27 CanvasSurfaceLayerBridgeObserver() {}
28 virtual ~CanvasSurfaceLayerBridgeObserver() {} 28 virtual ~CanvasSurfaceLayerBridgeObserver() {}
29 29
30 virtual void OnWebLayerReplaced() = 0; 30 virtual void OnWebLayerReplaced(int width, int height) = 0;
Justin Novosad 2016/12/20 22:06:08 Revert
31 }; 31 };
32 32
33 class PLATFORM_EXPORT CanvasSurfaceLayerBridge 33 class PLATFORM_EXPORT CanvasSurfaceLayerBridge
34 : NON_EXPORTED_BASE(public mojom::blink::OffscreenCanvasSurfaceClient) { 34 : NON_EXPORTED_BASE(public mojom::blink::OffscreenCanvasSurfaceClient) {
35 public: 35 public:
36 explicit CanvasSurfaceLayerBridge(CanvasSurfaceLayerBridgeObserver*); 36 explicit CanvasSurfaceLayerBridge(CanvasSurfaceLayerBridgeObserver*);
37 ~CanvasSurfaceLayerBridge(); 37 ~CanvasSurfaceLayerBridge();
38 void createSolidColorLayer(); 38 void createSolidColorLayer();
39 WebLayer* getWebLayer() const { return m_webLayer.get(); } 39 WebLayer* getWebLayer() const { return m_webLayer.get(); }
40 const cc::FrameSinkId& getFrameSinkId() const { return m_frameSinkId; } 40 const cc::FrameSinkId& getFrameSinkId() const { return m_frameSinkId; }
(...skipping 19 matching lines...) Expand all
60 mojom::blink::OffscreenCanvasSurfacePtr m_service; 60 mojom::blink::OffscreenCanvasSurfacePtr m_service;
61 mojo::Binding<mojom::blink::OffscreenCanvasSurfaceClient> m_binding; 61 mojo::Binding<mojom::blink::OffscreenCanvasSurfaceClient> m_binding;
62 62
63 cc::FrameSinkId m_frameSinkId; 63 cc::FrameSinkId m_frameSinkId;
64 cc::SurfaceId m_currentSurfaceId; 64 cc::SurfaceId m_currentSurfaceId;
65 }; 65 };
66 66
67 } // namespace blink 67 } // namespace blink
68 68
69 #endif // CanvasSurfaceLayerBridge_h 69 #endif // CanvasSurfaceLayerBridge_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698