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

Side by Side Diff: content/renderer/media/cdm_session_adapter.h

Issue 380953002: Set callback interface on WebCDMSessionImpl after creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + change Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/media/cdm_session_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
6 #define CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 6 #define CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const CreatePepperCdmCB& create_pepper_cdm_cb, 43 const CreatePepperCdmCB& create_pepper_cdm_cb,
44 #elif defined(ENABLE_BROWSER_CDMS) 44 #elif defined(ENABLE_BROWSER_CDMS)
45 RendererCdmManager* manager, 45 RendererCdmManager* manager,
46 #endif 46 #endif
47 const std::string& key_system, 47 const std::string& key_system,
48 const GURL& security_origin); 48 const GURL& security_origin);
49 49
50 // Creates a new session and adds it to the internal map. The caller owns the 50 // Creates a new session and adds it to the internal map. The caller owns the
51 // created session. RemoveSession() must be called when destroying it, if 51 // created session. RemoveSession() must be called when destroying it, if
52 // RegisterSession() was called. 52 // RegisterSession() was called.
53 WebContentDecryptionModuleSessionImpl* CreateSession( 53 WebContentDecryptionModuleSessionImpl* CreateSession();
54 blink::WebContentDecryptionModuleSession::Client* client);
55 54
56 // Adds a session to the internal map. Called once the session is successfully 55 // Adds a session to the internal map. Called once the session is successfully
57 // initialized. Returns true if the session was registered, false if there is 56 // initialized. Returns true if the session was registered, false if there is
58 // already an existing session with the same |web_session_id|. 57 // already an existing session with the same |web_session_id|.
59 bool RegisterSession( 58 bool RegisterSession(
60 const std::string& web_session_id, 59 const std::string& web_session_id,
61 base::WeakPtr<WebContentDecryptionModuleSessionImpl> session); 60 base::WeakPtr<WebContentDecryptionModuleSessionImpl> session);
62 61
63 // Removes a session from the internal map. 62 // Removes a session from the internal map.
64 void RemoveSession(const std::string& web_session_id); 63 void RemoveSession(const std::string& web_session_id);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 127
129 // NOTE: Weak pointers must be invalidated before all other member variables. 128 // NOTE: Weak pointers must be invalidated before all other member variables.
130 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; 129 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;
131 130
132 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); 131 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter);
133 }; 132 };
134 133
135 } // namespace content 134 } // namespace content
136 135
137 #endif // CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 136 #endif // CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/cdm_session_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698