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

Side by Side Diff: Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp

Issue 178663004: Oilpan: move WorkerGlobalScope to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 9 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" 6 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h"
7 7
8 #include "RuntimeEnabledFeatures.h" 8 #include "RuntimeEnabledFeatures.h"
9 #include "bindings/v8/ExceptionState.h" 9 #include "bindings/v8/ExceptionState.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 } 47 }
48 48
49 const char* HTMLMediaElementEncryptedMedia::supplementName() 49 const char* HTMLMediaElementEncryptedMedia::supplementName()
50 { 50 {
51 return "HTMLMediaElementEncryptedMedia"; 51 return "HTMLMediaElementEncryptedMedia";
52 } 52 }
53 53
54 HTMLMediaElementEncryptedMedia& HTMLMediaElementEncryptedMedia::from(HTMLMediaEl ement& element) 54 HTMLMediaElementEncryptedMedia& HTMLMediaElementEncryptedMedia::from(HTMLMediaEl ement& element)
55 { 55 {
56 Supplement<HTMLMediaElement>* supplement = Supplement<HTMLMediaElement>::fro m(element, supplementName()); 56 HTMLMediaElementEncryptedMedia* supplement = static_cast<HTMLMediaElementEnc ryptedMedia*>(Supplement<HTMLMediaElement>::from(element, supplementName()));
57 if (!supplement) { 57 if (!supplement) {
58 supplement = new HTMLMediaElementEncryptedMedia(); 58 supplement = new HTMLMediaElementEncryptedMedia();
59 provideTo(element, supplementName(), adoptPtr(supplement)); 59 provideTo(element, supplementName(), adoptPtr(supplement));
60 } 60 }
61 return *static_cast<HTMLMediaElementEncryptedMedia*>(supplement); 61 return *supplement;
62 } 62 }
63 63
64 bool HTMLMediaElementEncryptedMedia::setEmeMode(EmeMode emeMode, ExceptionState& exceptionState) 64 bool HTMLMediaElementEncryptedMedia::setEmeMode(EmeMode emeMode, ExceptionState& exceptionState)
65 { 65 {
66 if (m_emeMode != EmeModeNotSelected && m_emeMode != emeMode) { 66 if (m_emeMode != EmeModeNotSelected && m_emeMode != emeMode) {
67 exceptionState.throwDOMException(InvalidStateError, "Mixed use of EME pr efixed and unprefixed API not allowed."); 67 exceptionState.throwDOMException(InvalidStateError, "Mixed use of EME pr efixed and unprefixed API not allowed.");
68 return false; 68 return false;
69 } 69 }
70 m_emeMode = emeMode; 70 m_emeMode = emeMode;
71 return true; 71 return true;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 thisElement.setMediaKeysInternal(element, 0); 344 thisElement.setMediaKeysInternal(element, 0);
345 } 345 }
346 346
347 blink::WebContentDecryptionModule* HTMLMediaElementEncryptedMedia::contentDecryp tionModule(HTMLMediaElement& element) 347 blink::WebContentDecryptionModule* HTMLMediaElementEncryptedMedia::contentDecryp tionModule(HTMLMediaElement& element)
348 { 348 {
349 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element); 349 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element);
350 return thisElement.contentDecryptionModule(); 350 return thisElement.contentDecryptionModule();
351 } 351 }
352 352
353 } // namespace WebCore 353 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/crypto/WorkerGlobalScopeCrypto.cpp ('k') | Source/modules/imagebitmap/ImageBitmapFactories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698