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

Side by Side Diff: media/blink/cdm_session_adapter.h

Issue 833963003: Pass key_information on SessionKeysChange message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GN changes Created 5 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 unified diff | Download patch
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 MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 5 #ifndef MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 base::WeakPtr<WebContentDecryptionModuleSessionImpl> > 97 base::WeakPtr<WebContentDecryptionModuleSessionImpl> >
98 SessionMap; 98 SessionMap;
99 99
100 ~CdmSessionAdapter(); 100 ~CdmSessionAdapter();
101 101
102 // Callbacks for firing session events. 102 // Callbacks for firing session events.
103 void OnSessionMessage(const std::string& web_session_id, 103 void OnSessionMessage(const std::string& web_session_id,
104 const std::vector<uint8>& message, 104 const std::vector<uint8>& message,
105 const GURL& destination_url); 105 const GURL& destination_url);
106 void OnSessionKeysChange(const std::string& web_session_id, 106 void OnSessionKeysChange(const std::string& web_session_id,
107 bool has_additional_usable_key); 107 bool has_additional_usable_key,
108 const CdmKeyInformationVector& key_information);
108 void OnSessionExpirationUpdate(const std::string& web_session_id, 109 void OnSessionExpirationUpdate(const std::string& web_session_id,
109 const base::Time& new_expiry_time); 110 const base::Time& new_expiry_time);
110 void OnSessionClosed(const std::string& web_session_id); 111 void OnSessionClosed(const std::string& web_session_id);
111 void OnSessionError(const std::string& web_session_id, 112 void OnSessionError(const std::string& web_session_id,
112 MediaKeys::Exception exception_code, 113 MediaKeys::Exception exception_code,
113 uint32 system_code, 114 uint32 system_code,
114 const std::string& error_message); 115 const std::string& error_message);
115 116
116 // Helper function of the callbacks. 117 // Helper function of the callbacks.
117 WebContentDecryptionModuleSessionImpl* GetSession( 118 WebContentDecryptionModuleSessionImpl* GetSession(
118 const std::string& web_session_id); 119 const std::string& web_session_id);
119 120
120 scoped_ptr<MediaKeys> media_keys_; 121 scoped_ptr<MediaKeys> media_keys_;
121 122
122 SessionMap sessions_; 123 SessionMap sessions_;
123 124
124 std::string key_system_uma_prefix_; 125 std::string key_system_uma_prefix_;
125 126
126 // NOTE: Weak pointers must be invalidated before all other member variables. 127 // NOTE: Weak pointers must be invalidated before all other member variables.
127 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; 128 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;
128 129
129 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); 130 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter);
130 }; 131 };
131 132
132 } // namespace media 133 } // namespace media
133 134
134 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 135 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698