Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
| 10 #include "bindings/core/v8/ScriptPromiseResolver.h" | 10 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 private: | 56 private: |
| 57 SetMediaKeysHandler(ScriptState*, HTMLMediaElement&, MediaKeys*); | 57 SetMediaKeysHandler(ScriptState*, HTMLMediaElement&, MediaKeys*); |
| 58 void timerFired(Timer<SetMediaKeysHandler>*); | 58 void timerFired(Timer<SetMediaKeysHandler>*); |
| 59 | 59 |
| 60 void clearExistingMediaKeys(); | 60 void clearExistingMediaKeys(); |
| 61 void setNewMediaKeys(); | 61 void setNewMediaKeys(); |
| 62 void finish(); | 62 void finish(); |
| 63 | 63 |
| 64 void reportSetFailed(ExceptionCode, const String& errorMessage); | 64 void reportSetFailed(ExceptionCode, const String& errorMessage); |
| 65 | 65 |
| 66 RawPtrWillBeMember<HTMLMediaElement> m_element; | 66 RawPtrWillBePersistent<HTMLMediaElement> m_element; |
|
haraken
2014/09/25 03:35:27
Are you sure that the persistent handle doesn't ca
DanielChow
2014/09/25 03:48:32
I am not sure that the persistent handle doesn't c
sof
2014/09/25 05:21:24
Definitely worth checking, run them with --enable-
haraken
2014/09/25 05:45:02
If that's the case, I think we should use a RefPtr
| |
| 67 Persistent<MediaKeys> m_newMediaKeys; | 67 RawPtrWillBePersistent<MediaKeys> m_newMediaKeys; |
|
haraken
2014/09/25 03:35:27
MediaKeys are on-heap in both oilpan and non-oilpa
DanielChow
2014/09/25 03:48:32
Done.
| |
| 68 Timer<SetMediaKeysHandler> m_timer; | 68 Timer<SetMediaKeysHandler> m_timer; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 typedef Function<void()> SuccessCallback; | 71 typedef Function<void()> SuccessCallback; |
| 72 typedef Function<void(ExceptionCode, const String&)> FailureCallback; | 72 typedef Function<void(ExceptionCode, const String&)> FailureCallback; |
| 73 | 73 |
| 74 // Represents the result used when setContentDecryptionModule() is called. | 74 // Represents the result used when setContentDecryptionModule() is called. |
| 75 // Calls |success| if result is resolved, |failure| is result is rejected. | 75 // Calls |success| if result is resolved, |failure| is result is rejected. |
| 76 class SetContentDecryptionModuleResult FINAL : public ContentDecryptionModuleRes ult { | 76 class SetContentDecryptionModuleResult FINAL : public ContentDecryptionModuleRes ult { |
| 77 public: | 77 public: |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 540 return thisElement.contentDecryptionModule(); | 540 return thisElement.contentDecryptionModule(); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor) | 543 void HTMLMediaElementEncryptedMedia::trace(Visitor* visitor) |
| 544 { | 544 { |
| 545 visitor->trace(m_mediaKeys); | 545 visitor->trace(m_mediaKeys); |
| 546 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor); | 546 WillBeHeapSupplement<HTMLMediaElement>::trace(visitor); |
| 547 } | 547 } |
| 548 | 548 |
| 549 } // namespace blink | 549 } // namespace blink |
| OLD | NEW |