| 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 #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" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 |
| 13 class ContentDecryptionModuleResult; | 14 class ContentDecryptionModuleResult; |
| 14 } | |
| 15 | |
| 16 namespace blink { | |
| 17 | |
| 18 class WebString; | 15 class WebString; |
| 19 | 16 |
| 20 class WebContentDecryptionModuleResult { | 17 class WebContentDecryptionModuleResult { |
| 21 public: | 18 public: |
| 22 enum SessionStatus { | 19 enum SessionStatus { |
| 23 // New session has been initialized. | 20 // New session has been initialized. |
| 24 NewSession, | 21 NewSession, |
| 25 | 22 |
| 26 // CDM could not find the requested session. | 23 // CDM could not find the requested session. |
| 27 SessionNotFound, | 24 SessionNotFound, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 51 // pass back. | 48 // pass back. |
| 52 BLINK_PLATFORM_EXPORT void complete(); | 49 BLINK_PLATFORM_EXPORT void complete(); |
| 53 | 50 |
| 54 // Called when the CDM completes a session operation. | 51 // Called when the CDM completes a session operation. |
| 55 BLINK_PLATFORM_EXPORT void completeWithSession(SessionStatus); | 52 BLINK_PLATFORM_EXPORT void completeWithSession(SessionStatus); |
| 56 | 53 |
| 57 // Called when the operation fails. | 54 // Called when the operation fails. |
| 58 BLINK_PLATFORM_EXPORT void completeWithError(WebContentDecryptionModuleExcep
tion, unsigned long systemCode, const WebString& message); | 55 BLINK_PLATFORM_EXPORT void completeWithError(WebContentDecryptionModuleExcep
tion, unsigned long systemCode, const WebString& message); |
| 59 | 56 |
| 60 #if INSIDE_BLINK | 57 #if INSIDE_BLINK |
| 61 BLINK_PLATFORM_EXPORT explicit WebContentDecryptionModuleResult(blink::Conte
ntDecryptionModuleResult*); | 58 BLINK_PLATFORM_EXPORT explicit WebContentDecryptionModuleResult(ContentDecry
ptionModuleResult*); |
| 62 #endif | 59 #endif |
| 63 | 60 |
| 64 private: | 61 private: |
| 65 BLINK_PLATFORM_EXPORT void reset(); | 62 BLINK_PLATFORM_EXPORT void reset(); |
| 66 BLINK_PLATFORM_EXPORT void assign(const WebContentDecryptionModuleResult&); | 63 BLINK_PLATFORM_EXPORT void assign(const WebContentDecryptionModuleResult&); |
| 67 | 64 |
| 68 WebPrivatePtr<blink::ContentDecryptionModuleResult> m_impl; | 65 WebPrivatePtr<ContentDecryptionModuleResult> m_impl; |
| 69 }; | 66 }; |
| 70 | 67 |
| 71 } // namespace blink | 68 } // namespace blink |
| 72 | 69 |
| 73 #endif // WebContentDecryptionModuleSession_h | 70 #endif // WebContentDecryptionModuleSession_h |
| OLD | NEW |