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

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

Issue 257503003: Oilpan: Enable Oilpan by default in modules/encryptedmedia (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element); 79 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element);
80 return thisElement.m_mediaKeys.get(); 80 return thisElement.m_mediaKeys.get();
81 } 81 }
82 82
83 void HTMLMediaElementEncryptedMedia::setMediaKeysInternal(HTMLMediaElement& elem ent, MediaKeys* mediaKeys) 83 void HTMLMediaElementEncryptedMedia::setMediaKeysInternal(HTMLMediaElement& elem ent, MediaKeys* mediaKeys)
84 { 84 {
85 if (m_mediaKeys == mediaKeys) 85 if (m_mediaKeys == mediaKeys)
86 return; 86 return;
87 87
88 ASSERT(m_emeMode == EmeModeUnprefixed); 88 ASSERT(m_emeMode == EmeModeUnprefixed);
89
90 if (m_mediaKeys)
91 m_mediaKeys->setMediaElement(0);
92 m_mediaKeys = mediaKeys; 89 m_mediaKeys = mediaKeys;
93 if (m_mediaKeys)
94 m_mediaKeys->setMediaElement(&element);
95 90
96 // If a player is connected, tell it that the CDM has changed. 91 // If a player is connected, tell it that the CDM has changed.
97 if (element.webMediaPlayer()) 92 if (element.webMediaPlayer())
98 element.webMediaPlayer()->setContentDecryptionModule(contentDecryptionMo dule()); 93 element.webMediaPlayer()->setContentDecryptionModule(contentDecryptionMo dule());
99 } 94 }
100 95
101 void HTMLMediaElementEncryptedMedia::setMediaKeys(HTMLMediaElement& element, Med iaKeys* mediaKeys, ExceptionState& exceptionState) 96 void HTMLMediaElementEncryptedMedia::setMediaKeys(HTMLMediaElement& element, Med iaKeys* mediaKeys, ExceptionState& exceptionState)
102 { 97 {
103 WTF_LOG(Media, "HTMLMediaElementEncryptedMedia::setMediaKeys"); 98 WTF_LOG(Media, "HTMLMediaElementEncryptedMedia::setMediaKeys");
104 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element); 99 HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia ::from(element);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return thisElement.contentDecryptionModule(); 349 return thisElement.contentDecryptionModule();
355 } 350 }
356 351
357 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor) 352 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor)
358 { 353 {
359 visitor->trace(m_mediaKeys); 354 visitor->trace(m_mediaKeys);
360 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor); 355 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor);
361 } 356 }
362 357
363 } // namespace WebCore 358 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h ('k') | Source/modules/encryptedmedia/MediaKeySession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698