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

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
« no previous file with comments | « Source/core/html/HTMLVideoElement.h ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 KURL HTMLVideoElement::posterImageURL() const 287 KURL HTMLVideoElement::posterImageURL() const
288 { 288 {
289 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); 289 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());
290 if (url.isEmpty()) 290 if (url.isEmpty())
291 return KURL(); 291 return KURL();
292 return document().completeURL(url); 292 return document().completeURL(url);
293 } 293 }
294 294
295 KURL HTMLVideoElement::mediaPlayerPosterURL()
296 {
297 return posterImageURL();
298 }
299
300 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode , SourceImageStatus* status) const 295 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode , SourceImageStatus* status) const
301 { 296 {
302 if (!hasAvailableVideoFrame()) { 297 if (!hasAvailableVideoFrame()) {
303 *status = InvalidSourceImageStatus; 298 *status = InvalidSourceImageStatus;
304 return nullptr; 299 return nullptr;
305 } 300 }
306 301
307 IntSize intrinsicSize(videoWidth(), videoHeight()); 302 IntSize intrinsicSize(videoWidth(), videoHeight());
308 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize); 303 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize);
309 if (!imageBuffer) { 304 if (!imageBuffer) {
(...skipping 11 matching lines...) Expand all
321 { 316 {
322 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); 317 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin);
323 } 318 }
324 319
325 FloatSize HTMLVideoElement::elementSize() const 320 FloatSize HTMLVideoElement::elementSize() const
326 { 321 {
327 return FloatSize(videoWidth(), videoHeight()); 322 return FloatSize(videoWidth(), videoHeight());
328 } 323 }
329 324
330 } // namespace blink 325 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLVideoElement.h ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698