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

Unified Diff: media/mojo/clients/mojo_cdm.h

Issue 2592913002: [eme] Break mojo connection during call (Closed)
Patch Set: remaining nits Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/mock_filters.cc ('k') | media/mojo/clients/mojo_cdm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_cdm.h
diff --git a/media/mojo/clients/mojo_cdm.h b/media/mojo/clients/mojo_cdm.h
index e72b5352d9d945c528ff9a839ce97c9c3349a3d9..425e90183b27a50856e128923140603b0922b8d1 100644
--- a/media/mojo/clients/mojo_cdm.h
+++ b/media/mojo/clients/mojo_cdm.h
@@ -17,6 +17,7 @@
#include "base/threading/thread_checker.h"
#include "media/base/cdm_context.h"
#include "media/base/cdm_initialized_promise.h"
+#include "media/base/cdm_promise_adapter.h"
#include "media/base/cdm_session_tracker.h"
#include "media/base/content_decryption_module.h"
#include "media/mojo/interfaces/content_decryption_module.mojom.h"
@@ -113,12 +114,11 @@ class MojoCdm : public ContentDecryptionModule,
void OnKeyAdded();
// Callbacks to handle CDM promises.
- void OnSimpleCdmPromiseResult(std::unique_ptr<SimpleCdmPromise> promise,
+ void OnSimpleCdmPromiseResult(uint32_t promise_id,
mojom::CdmPromiseResultPtr result);
- void OnNewSessionCdmPromiseResult(
- std::unique_ptr<NewSessionCdmPromise> promise,
- mojom::CdmPromiseResultPtr result,
- const std::string& session_id);
+ void OnNewSessionCdmPromiseResult(uint32_t promise_id,
+ mojom::CdmPromiseResultPtr result,
+ const std::string& session_id);
base::ThreadChecker thread_checker_;
@@ -157,6 +157,9 @@ class MojoCdm : public ContentDecryptionModule,
// Keep track of current sessions.
CdmSessionTracker cdm_session_tracker_;
+ // Keep track of outstanding promises.
+ CdmPromiseAdapter cdm_promise_adapter_;
+
// This must be the last member.
base::WeakPtrFactory<MojoCdm> weak_factory_;
« no previous file with comments | « media/base/mock_filters.cc ('k') | media/mojo/clients/mojo_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698