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

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

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 323 }
324 324
325 IntSize HTMLVideoElement::bitmapSourceSize() const 325 IntSize HTMLVideoElement::bitmapSourceSize() const
326 { 326 {
327 return IntSize(videoWidth(), videoHeight()); 327 return IntSize(videoWidth(), videoHeight());
328 } 328 }
329 329
330 ScriptPromise HTMLVideoElement::createImageBitmap(ScriptState* scriptState, Even tTarget& eventTarget, Optional<IntRect> cropRect, const ImageBitmapOptions& opti ons, ExceptionState& exceptionState) 330 ScriptPromise HTMLVideoElement::createImageBitmap(ScriptState* scriptState, Even tTarget& eventTarget, Optional<IntRect> cropRect, const ImageBitmapOptions& opti ons, ExceptionState& exceptionState)
331 { 331 {
332 DCHECK(eventTarget.toLocalDOMWindow()); 332 DCHECK(eventTarget.toLocalDOMWindow());
333 if (getNetworkState() == HTMLMediaElement::NETWORK_EMPTY) { 333 if (getNetworkState() == HTMLMediaElement::kNetworkEmpty) {
334 exceptionState.throwDOMException(InvalidStateError, "The provided elemen t has not retrieved data."); 334 exceptionState.throwDOMException(InvalidStateError, "The provided elemen t has not retrieved data.");
335 return ScriptPromise(); 335 return ScriptPromise();
336 } 336 }
337 if (getReadyState() <= HTMLMediaElement::HAVE_METADATA) { 337 if (getReadyState() <= HTMLMediaElement::kHaveMetadata) {
338 exceptionState.throwDOMException(InvalidStateError, "The provided elemen t's player has no current data."); 338 exceptionState.throwDOMException(InvalidStateError, "The provided elemen t's player has no current data.");
339 return ScriptPromise(); 339 return ScriptPromise();
340 } 340 }
341 if ((cropRect && !ImageBitmap::isSourceSizeValid(cropRect->width(), cropRect ->height(), exceptionState)) 341 if ((cropRect && !ImageBitmap::isSourceSizeValid(cropRect->width(), cropRect ->height(), exceptionState))
342 || !ImageBitmap::isSourceSizeValid(bitmapSourceSize().width(), bitmapSou rceSize().height(), exceptionState)) 342 || !ImageBitmap::isSourceSizeValid(bitmapSourceSize().width(), bitmapSou rceSize().height(), exceptionState))
343 return ScriptPromise(); 343 return ScriptPromise();
344 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) 344 if (!ImageBitmap::isResizeOptionValid(options, exceptionState))
345 return ScriptPromise(); 345 return ScriptPromise();
346 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat e(this, cropRect, eventTarget.toLocalDOMWindow()->document(), options)); 346 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat e(this, cropRect, eventTarget.toLocalDOMWindow()->document(), options));
347 } 347 }
348 348
349 } // namespace blink 349 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTrackElement.idl ('k') | third_party/WebKit/Source/core/html/MediaError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698