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

Unified Diff: third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
index a338af74f49c37716ccde2631ec1d372ea93f5cc..0ba9da021e13ee62e5ab337c839716887102aa77 100644
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
@@ -55,12 +55,13 @@ MediaStream* HTMLCanvasElementCapture::captureStream(
WebMediaStreamTrack track;
const WebSize size(element.width(), element.height());
std::unique_ptr<WebCanvasCaptureHandler> handler;
- if (given_frame_rate)
- handler = WTF::WrapUnique(Platform::Current()->CreateCanvasCaptureHandler(
- size, frame_rate, &track));
- else
- handler = WTF::WrapUnique(Platform::Current()->CreateCanvasCaptureHandler(
- size, kDefaultFrameRate, &track));
+ if (given_frame_rate) {
+ handler = Platform::Current()->CreateCanvasCaptureHandler(size, frame_rate,
+ &track);
+ } else {
+ handler = Platform::Current()->CreateCanvasCaptureHandler(
+ size, kDefaultFrameRate, &track);
+ }
if (!handler) {
exception_state.ThrowDOMException(

Powered by Google App Engine
This is Rietveld 408576698