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

Unified Diff: Source/modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h
diff --git a/Source/modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h b/Source/modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h
new file mode 100644
index 0000000000000000000000000000000000000000..d89e16752808d079b408364cf0a669bd55943f76
--- /dev/null
+++ b/Source/modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h
@@ -0,0 +1,27 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SimpleContentDecryptionModuleResultPromise_h
+#define SimpleContentDecryptionModuleResultPromise_h
+
+#include "modules/encryptedmedia/ContentDecryptionModuleResultPromise.h"
+
+namespace blink {
+
+// This class creates a simple ContentDecryptionModuleResultPromise where the
+// implementation of complete() will resolve the promise with void. All other
+// complete() methods are not expected to be called (and will reject the
+// promise).
+class SimpleContentDecryptionModuleResultPromise : public ContentDecryptionModuleResultPromise {
+public:
+ explicit SimpleContentDecryptionModuleResultPromise(ScriptState*);
+ virtual ~SimpleContentDecryptionModuleResultPromise();
+
+ // ContentDecryptionModuleResultPromise implementation.
+ virtual void complete() override;
+};
+
+} // namespace blink
+
+#endif // SimpleContentDecryptionModuleResultPromise_h

Powered by Google App Engine
This is Rietveld 408576698