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

Unified Diff: chromecast/media/cdm/browser_cdm_cast.h

Issue 903083003: Chromecast: change BrowserCdmCast threading model. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 10 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 | « no previous file | chromecast/media/cdm/browser_cdm_cast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cdm/browser_cdm_cast.h
diff --git a/chromecast/media/cdm/browser_cdm_cast.h b/chromecast/media/cdm/browser_cdm_cast.h
index 66c1794601f376685d9f1fa04921e4777d77d776..cd1eac1367fb9eed53e47f809b9740d9cf5581cb 100644
--- a/chromecast/media/cdm/browser_cdm_cast.h
+++ b/chromecast/media/cdm/browser_cdm_cast.h
@@ -13,9 +13,9 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/synchronization/lock.h"
#include "media/base/browser_cdm.h"
#include "media/cdm/json_web_key.h"
-#include "media/cdm/player_tracker_impl.h"
namespace chromecast {
namespace media {
@@ -49,7 +49,7 @@ class BrowserCdmCast : public ::media::BrowserCdm {
// |key_id|.
// Returns null if |key_id| is not available.
virtual scoped_refptr<DecryptContext> GetDecryptContext(
- const std::string& key_id) const = 0;
+ const std::string& key_id) = 0;
protected:
void OnSessionMessage(const std::string& web_session_id,
@@ -66,7 +66,10 @@ class BrowserCdmCast : public ::media::BrowserCdm {
::media::SessionKeysChangeCB session_keys_change_cb_;
::media::SessionExpirationUpdateCB session_expiration_update_cb_;
- ::media::PlayerTrackerImpl player_tracker_;
+ base::Lock callback_lock_;
+ uint32_t next_registration_id_;
+ std::map<uint32_t, base::Closure> new_key_callbacks_;
+ std::map<uint32_t, base::Closure> cdm_unset_callbacks_;
DISALLOW_COPY_AND_ASSIGN(BrowserCdmCast);
};
« no previous file with comments | « no previous file | chromecast/media/cdm/browser_cdm_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698