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

Side by Side Diff: Source/core/html/HTMLVideoElement.cpp

Issue 1055503002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 5 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 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 288
289 KURL HTMLVideoElement::posterImageURL() const 289 KURL HTMLVideoElement::posterImageURL() const
290 { 290 {
291 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); 291 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());
292 if (url.isEmpty()) 292 if (url.isEmpty())
293 return KURL(); 293 return KURL();
294 return document().completeURL(url); 294 return document().completeURL(url);
295 } 295 }
296 296
297 KURL HTMLVideoElement::mediaPlayerPosterURL()
298 {
299 return posterImageURL();
300 }
301
302 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode , SourceImageStatus* status) const 297 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode , SourceImageStatus* status) const
303 { 298 {
304 if (!hasAvailableVideoFrame()) { 299 if (!hasAvailableVideoFrame()) {
305 *status = InvalidSourceImageStatus; 300 *status = InvalidSourceImageStatus;
306 return nullptr; 301 return nullptr;
307 } 302 }
308 303
309 IntSize intrinsicSize(videoWidth(), videoHeight()); 304 IntSize intrinsicSize(videoWidth(), videoHeight());
310 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize); 305 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize);
311 if (!imageBuffer) { 306 if (!imageBuffer) {
(...skipping 11 matching lines...) Expand all
323 { 318 {
324 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); 319 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin);
325 } 320 }
326 321
327 FloatSize HTMLVideoElement::elementSize() const 322 FloatSize HTMLVideoElement::elementSize() const
328 { 323 {
329 return FloatSize(videoWidth(), videoHeight()); 324 return FloatSize(videoWidth(), videoHeight());
330 } 325 }
331 326
332 } // namespace blink 327 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698