| 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 CanvasDrawListener_h | 5 #ifndef CanvasDrawListener_h |
| 6 #define CanvasDrawListener_h | 6 #define CanvasDrawListener_h |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include "core/CoreExport.h" | 9 #include "core/CoreExport.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 class SkImage; | 14 class SkImage; |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class CORE_EXPORT CanvasDrawListener : public GarbageCollectedMixin { | 18 class CORE_EXPORT CanvasDrawListener : public GarbageCollectedMixin { |
| 19 public: | 19 public: |
| 20 virtual ~CanvasDrawListener(); | 20 virtual ~CanvasDrawListener(); |
| 21 virtual void sendNewFrame(sk_sp<SkImage>); | 21 virtual void sendNewFrame(sk_sp<SkImage>); |
| 22 bool needsNewFrame() const; | 22 bool needsNewFrame() const; |
| 23 void requestFrame(); | 23 void requestFrame(); |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 explicit CanvasDrawListener(std::unique_ptr<WebCanvasCaptureHandler>); | 26 explicit CanvasDrawListener(std::unique_ptr<WebCanvasCaptureHandler>); |
| 27 | 27 |
| 28 bool m_frameCaptureRequested; | 28 bool m_frameCaptureRequested; |
| 29 std::unique_ptr<WebCanvasCaptureHandler> m_handler; | 29 std::unique_ptr<WebCanvasCaptureHandler> m_handler; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace blink | 32 } // namespace blink |
| 33 | 33 |
| 34 #endif | 34 #endif |
| OLD | NEW |