Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / content / renderer / media / cdm_session_adapter.h
index de27125..7e32669 100644 (file)
@@ -50,12 +50,12 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
   // Creates a new session and adds it to the internal map. The caller owns the
   // created session. RemoveSession() must be called when destroying it, if
   // RegisterSession() was called.
-  WebContentDecryptionModuleSessionImpl* CreateSession(
-      blink::WebContentDecryptionModuleSession::Client* client);
+  WebContentDecryptionModuleSessionImpl* CreateSession();
 
   // Adds a session to the internal map. Called once the session is successfully
-  // initialized.
-  void RegisterSession(
+  // initialized. Returns true if the session was registered, false if there is
+  // already an existing session with the same |web_session_id|.
+  bool RegisterSession(
       const std::string& web_session_id,
       base::WeakPtr<WebContentDecryptionModuleSessionImpl> session);
 
@@ -88,6 +88,9 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
   // after WebContentDecryptionModule is freed. http://crbug.com/330324
   media::Decryptor* GetDecryptor();
 
+  // Returns a prefix to use for UMAs.
+  const std::string& GetKeySystemUMAPrefix() const;
+
 #if defined(ENABLE_BROWSER_CDMS)
   // Returns the CDM ID associated with the |media_keys_|. May be kInvalidCdmId
   // if no CDM ID is associated.
@@ -125,6 +128,8 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
   int cdm_id_;
 #endif
 
+  std::string key_system_uma_prefix_;
+
   // NOTE: Weak pointers must be invalidated before all other member variables.
   base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;