| 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 #include "modules/mediacapturefromelement/OnRequestCanvasDrawListener.h" | 5 #include "modules/mediacapturefromelement/OnRequestCanvasDrawListener.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "third_party/skia/include/core/SkImage.h" | 8 #include "third_party/skia/include/core/SkImage.h" |
| 8 #include <memory> | |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 OnRequestCanvasDrawListener::OnRequestCanvasDrawListener( | 12 OnRequestCanvasDrawListener::OnRequestCanvasDrawListener( |
| 13 std::unique_ptr<WebCanvasCaptureHandler> handler) | 13 std::unique_ptr<WebCanvasCaptureHandler> handler) |
| 14 : CanvasDrawListener(std::move(handler)) {} | 14 : CanvasDrawListener(std::move(handler)) {} |
| 15 | 15 |
| 16 OnRequestCanvasDrawListener::~OnRequestCanvasDrawListener() {} | 16 OnRequestCanvasDrawListener::~OnRequestCanvasDrawListener() {} |
| 17 | 17 |
| 18 // static | 18 // static |
| 19 OnRequestCanvasDrawListener* OnRequestCanvasDrawListener::create( | 19 OnRequestCanvasDrawListener* OnRequestCanvasDrawListener::create( |
| 20 std::unique_ptr<WebCanvasCaptureHandler> handler) { | 20 std::unique_ptr<WebCanvasCaptureHandler> handler) { |
| 21 return new OnRequestCanvasDrawListener(std::move(handler)); | 21 return new OnRequestCanvasDrawListener(std::move(handler)); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void OnRequestCanvasDrawListener::sendNewFrame(sk_sp<SkImage> image) { | 24 void OnRequestCanvasDrawListener::sendNewFrame(sk_sp<SkImage> image) { |
| 25 m_frameCaptureRequested = false; | 25 m_frameCaptureRequested = false; |
| 26 CanvasDrawListener::sendNewFrame(std::move(image)); | 26 CanvasDrawListener::sendNewFrame(std::move(image)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace blink | 29 } // namespace blink |
| OLD | NEW |