OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 OnRequestCanvasDrawListener_h | 5 #ifndef OnRequestCanvasDrawListener_h |
6 #define OnRequestCanvasDrawListener_h | 6 #define OnRequestCanvasDrawListener_h |
7 | 7 |
| 8 #include <memory> |
8 #include "core/html/canvas/CanvasDrawListener.h" | 9 #include "core/html/canvas/CanvasDrawListener.h" |
9 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
10 #include "public/platform/WebCanvasCaptureHandler.h" | 11 #include "public/platform/WebCanvasCaptureHandler.h" |
11 #include "third_party/skia/include/core/SkRefCnt.h" | 12 #include "third_party/skia/include/core/SkRefCnt.h" |
12 #include <memory> | |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class OnRequestCanvasDrawListener final | 16 class OnRequestCanvasDrawListener final |
17 : public GarbageCollectedFinalized<OnRequestCanvasDrawListener>, | 17 : public GarbageCollectedFinalized<OnRequestCanvasDrawListener>, |
18 public CanvasDrawListener { | 18 public CanvasDrawListener { |
19 USING_GARBAGE_COLLECTED_MIXIN(OnRequestCanvasDrawListener); | 19 USING_GARBAGE_COLLECTED_MIXIN(OnRequestCanvasDrawListener); |
20 | 20 |
21 public: | 21 public: |
22 ~OnRequestCanvasDrawListener(); | 22 ~OnRequestCanvasDrawListener(); |
23 static OnRequestCanvasDrawListener* Create( | 23 static OnRequestCanvasDrawListener* Create( |
24 std::unique_ptr<WebCanvasCaptureHandler>); | 24 std::unique_ptr<WebCanvasCaptureHandler>); |
25 void SendNewFrame(sk_sp<SkImage>) override; | 25 void SendNewFrame(sk_sp<SkImage>) override; |
26 | 26 |
27 DEFINE_INLINE_TRACE() {} | 27 DEFINE_INLINE_TRACE() {} |
28 | 28 |
29 private: | 29 private: |
30 OnRequestCanvasDrawListener(std::unique_ptr<WebCanvasCaptureHandler>); | 30 OnRequestCanvasDrawListener(std::unique_ptr<WebCanvasCaptureHandler>); |
31 }; | 31 }; |
32 | 32 |
33 } // namespace blink | 33 } // namespace blink |
34 | 34 |
35 #endif | 35 #endif |
OLD | NEW |