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
3 // found in the LICENSE file.
5 #ifndef WebContentDecryptionModuleResult_h
6 #define WebContentDecryptionModuleResult_h
9 #include "WebContentDecryptionModuleException.h"
10 #include "WebPrivatePtr.h"
14 class ContentDecryptionModuleResult;
17 class WebContentDecryptionModuleResult {
20 // New session has been initialized.
23 // CDM could not find the requested session.
26 // CDM already has a non-closed session that matches the provided
31 WebContentDecryptionModuleResult(const WebContentDecryptionModuleResult& o)
36 ~WebContentDecryptionModuleResult()
41 WebContentDecryptionModuleResult& operator=(const WebContentDecryptionModuleResult& o)
47 // Called when the CDM completes an operation and has no additional data to
49 BLINK_PLATFORM_EXPORT void complete();
51 // Called when the CDM completes a session operation.
52 BLINK_PLATFORM_EXPORT void completeWithSession(SessionStatus);
54 // Called when the operation fails.
55 BLINK_PLATFORM_EXPORT void completeWithError(WebContentDecryptionModuleException, unsigned long systemCode, const WebString& message);
58 BLINK_PLATFORM_EXPORT explicit WebContentDecryptionModuleResult(ContentDecryptionModuleResult*);
62 BLINK_PLATFORM_EXPORT void reset();
63 BLINK_PLATFORM_EXPORT void assign(const WebContentDecryptionModuleResult&);
65 WebPrivatePtr<ContentDecryptionModuleResult> m_impl;
70 #endif // WebContentDecryptionModuleSession_h