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. 4 5 #ifndef ContentDecryptionModuleResult_h 6 #define ContentDecryptionModuleResult_h 7 8 #include "platform/heap/Handle.h" 9 #include "public/platform/WebContentDecryptionModuleException.h" 10 #include "public/platform/WebContentDecryptionModuleResult.h" 11 12 namespace blink { 13 14 class WebString; 15 16 // Used to notify completion of a CDM operation. 17 class ContentDecryptionModuleResult : public GarbageCollectedFinalized<ContentDecryptionModuleResult> { 18 public: 19 virtual ~ContentDecryptionModuleResult() { } 20 21 virtual void complete() = 0; 22 virtual void completeWithSession(WebContentDecryptionModuleResult::SessionStatus) = 0; 23 virtual void completeWithError(WebContentDecryptionModuleException, unsigned long systemCode, const WebString&) = 0; 24 25 WebContentDecryptionModuleResult result() 26 { 27 return WebContentDecryptionModuleResult(this); 28 } 29 30 virtual void trace(Visitor*) { } 31 }; 32 33 } // namespace blink 34 35 #endif // ContentDecryptionModuleResult_h 36