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

Side by Side Diff: Source/modules/encryptedmedia/MediaKeySession.h

Issue 687533004: Simplify use of ContentDecryptionModuleResult with promises (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes Created 6 years, 1 month 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) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual ExecutionContext* executionContext() const override; 91 virtual ExecutionContext* executionContext() const override;
92 92
93 // ActiveDOMObject 93 // ActiveDOMObject
94 virtual bool hasPendingActivity() const override; 94 virtual bool hasPendingActivity() const override;
95 virtual void stop() override; 95 virtual void stop() override;
96 96
97 virtual void trace(Visitor*) override; 97 virtual void trace(Visitor*) override;
98 98
99 private: 99 private:
100 class PendingAction; 100 class PendingAction;
101 friend class NewSessionResult; 101 friend class NewSessionResultPromise;
102 friend class LoadSessionResult; 102 friend class LoadSessionResultPromise;
103 103
104 MediaKeySession(ScriptState*, MediaKeys*, const String& sessionType); 104 MediaKeySession(ScriptState*, MediaKeys*, const String& sessionType);
105 105
106 void actionTimerFired(Timer<MediaKeySession>*); 106 void actionTimerFired(Timer<MediaKeySession>*);
107 107
108 // WebContentDecryptionModuleSession::Client 108 // WebContentDecryptionModuleSession::Client
109 virtual void message(const unsigned char* message, size_t messageLength, con st WebURL& destinationURL) override; 109 virtual void message(const unsigned char* message, size_t messageLength, con st WebURL& destinationURL) override;
110 virtual void ready() override; 110 virtual void ready() override;
111 virtual void close() override; 111 virtual void close() override;
112 virtual void error(MediaKeyErrorCode, unsigned long systemCode) override; 112 virtual void error(MediaKeyErrorCode, unsigned long systemCode) override;
(...skipping 30 matching lines...) Expand all
143 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP trWillBeMember<DOMException> > ClosedPromise; 143 typedef ScriptPromiseProperty<Member<MediaKeySession>, V8UndefinedType, RefP trWillBeMember<DOMException> > ClosedPromise;
144 Member<ClosedPromise> m_closedPromise; 144 Member<ClosedPromise> m_closedPromise;
145 145
146 HeapDeque<Member<PendingAction> > m_pendingActions; 146 HeapDeque<Member<PendingAction> > m_pendingActions;
147 Timer<MediaKeySession> m_actionTimer; 147 Timer<MediaKeySession> m_actionTimer;
148 }; 148 };
149 149
150 } // namespace blink 150 } // namespace blink
151 151
152 #endif // MediaKeySession_h 152 #endif // MediaKeySession_h
OLDNEW
« no previous file with comments | « Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp ('k') | Source/modules/encryptedmedia/MediaKeySession.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698