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

Side by Side Diff: third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h

Issue 1729063003: media: Reject pending CDM promise during destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 #ifndef WebContentDecryptionModuleResult_h 5 #ifndef WebContentDecryptionModuleResult_h
6 #define WebContentDecryptionModuleResult_h 6 #define WebContentDecryptionModuleResult_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "WebContentDecryptionModuleException.h" 9 #include "WebContentDecryptionModuleException.h"
10 #include "WebPrivatePtr.h" 10 #include "WebPrivatePtr.h"
(...skipping 27 matching lines...) Expand all
38 { 38 {
39 reset(); 39 reset();
40 } 40 }
41 41
42 WebContentDecryptionModuleResult& operator=(const WebContentDecryptionModule Result& o) 42 WebContentDecryptionModuleResult& operator=(const WebContentDecryptionModule Result& o)
43 { 43 {
44 assign(o); 44 assign(o);
45 return *this; 45 return *this;
46 } 46 }
47 47
48 // Returns whether the operation has been completed (success or fail).
49 BLINK_PLATFORM_EXPORT bool isCompleted();
50
48 // Called when the CDM completes an operation and has no additional data to 51 // Called when the CDM completes an operation and has no additional data to
49 // pass back. 52 // pass back.
50 BLINK_PLATFORM_EXPORT void complete(); 53 BLINK_PLATFORM_EXPORT void complete();
51 54
52 // Called when a CDM is created. 55 // Called when a CDM is created.
53 BLINK_PLATFORM_EXPORT void completeWithContentDecryptionModule(WebContentDec ryptionModule*); 56 BLINK_PLATFORM_EXPORT void completeWithContentDecryptionModule(WebContentDec ryptionModule*);
54 57
55 // Called when the CDM completes a session operation. 58 // Called when the CDM completes a session operation.
56 BLINK_PLATFORM_EXPORT void completeWithSession(SessionStatus); 59 BLINK_PLATFORM_EXPORT void completeWithSession(SessionStatus);
57 60
58 // Called when the operation fails. 61 // Called when the operation fails.
59 BLINK_PLATFORM_EXPORT void completeWithError(WebContentDecryptionModuleExcep tion, unsigned long systemCode, const WebString& message); 62 BLINK_PLATFORM_EXPORT void completeWithError(WebContentDecryptionModuleExcep tion, unsigned long systemCode, const WebString& message);
60 63
61 #if INSIDE_BLINK 64 #if INSIDE_BLINK
62 BLINK_PLATFORM_EXPORT explicit WebContentDecryptionModuleResult(ContentDecry ptionModuleResult*); 65 BLINK_PLATFORM_EXPORT explicit WebContentDecryptionModuleResult(ContentDecry ptionModuleResult*);
63 #endif 66 #endif
64 67
65 private: 68 private:
66 BLINK_PLATFORM_EXPORT void reset(); 69 BLINK_PLATFORM_EXPORT void reset();
67 BLINK_PLATFORM_EXPORT void assign(const WebContentDecryptionModuleResult&); 70 BLINK_PLATFORM_EXPORT void assign(const WebContentDecryptionModuleResult&);
68 71
69 WebPrivatePtr<ContentDecryptionModuleResult, WebPrivatePtrDestructionCrossTh read> m_impl; 72 WebPrivatePtr<ContentDecryptionModuleResult, WebPrivatePtrDestructionCrossTh read> m_impl;
70 }; 73 };
71 74
72 } // namespace blink 75 } // namespace blink
73 76
74 #endif // WebContentDecryptionModuleSession_h 77 #endif // WebContentDecryptionModuleSession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698