OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "webkit/media/webmediaplayer_proxy.h" | 5 #include "webkit/media/webmediaplayer_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "media/base/pipeline_status.h" | 10 #include "media/base/pipeline_status.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 scoped_array<uint8> message, | 128 scoped_array<uint8> message, |
129 int message_length, | 129 int message_length, |
130 const std::string& default_url) { | 130 const std::string& default_url) { |
131 render_loop_->PostTask(FROM_HERE, base::Bind( | 131 render_loop_->PostTask(FROM_HERE, base::Bind( |
132 &WebMediaPlayerProxy::KeyMessageTask, this, key_system, session_id, | 132 &WebMediaPlayerProxy::KeyMessageTask, this, key_system, session_id, |
133 base::Passed(&message), message_length, default_url)); | 133 base::Passed(&message), message_length, default_url)); |
134 } | 134 } |
135 | 135 |
136 void WebMediaPlayerProxy::NeedKey(const std::string& key_system, | 136 void WebMediaPlayerProxy::NeedKey(const std::string& key_system, |
137 const std::string& session_id, | 137 const std::string& session_id, |
| 138 const std::string& type, |
138 scoped_array<uint8> init_data, | 139 scoped_array<uint8> init_data, |
139 int init_data_size) { | 140 int init_data_size) { |
140 render_loop_->PostTask(FROM_HERE, base::Bind( | 141 render_loop_->PostTask(FROM_HERE, base::Bind( |
141 &WebMediaPlayerProxy::NeedKeyTask, this, key_system, session_id, | 142 &WebMediaPlayerProxy::NeedKeyTask, this, key_system, session_id, type, |
142 base::Passed(&init_data), init_data_size)); | 143 base::Passed(&init_data), init_data_size)); |
143 } | 144 } |
144 | 145 |
145 void WebMediaPlayerProxy::KeyAddedTask(const std::string& key_system, | 146 void WebMediaPlayerProxy::KeyAddedTask(const std::string& key_system, |
146 const std::string& session_id) { | 147 const std::string& session_id) { |
147 DCHECK(render_loop_->BelongsToCurrentThread()); | 148 DCHECK(render_loop_->BelongsToCurrentThread()); |
148 if (webmediaplayer_) | 149 if (webmediaplayer_) |
149 webmediaplayer_->OnKeyAdded(key_system, session_id); | 150 webmediaplayer_->OnKeyAdded(key_system, session_id); |
150 } | 151 } |
151 | 152 |
(...skipping 13 matching lines...) Expand all Loading... |
165 int message_length, | 166 int message_length, |
166 const std::string& default_url) { | 167 const std::string& default_url) { |
167 DCHECK(render_loop_->BelongsToCurrentThread()); | 168 DCHECK(render_loop_->BelongsToCurrentThread()); |
168 if (webmediaplayer_) | 169 if (webmediaplayer_) |
169 webmediaplayer_->OnKeyMessage(key_system, session_id, | 170 webmediaplayer_->OnKeyMessage(key_system, session_id, |
170 message.Pass(), message_length, default_url); | 171 message.Pass(), message_length, default_url); |
171 } | 172 } |
172 | 173 |
173 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, | 174 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, |
174 const std::string& session_id, | 175 const std::string& session_id, |
| 176 const std::string& type, |
175 scoped_array<uint8> init_data, | 177 scoped_array<uint8> init_data, |
176 int init_data_size) { | 178 int init_data_size) { |
177 DCHECK(render_loop_->BelongsToCurrentThread()); | 179 DCHECK(render_loop_->BelongsToCurrentThread()); |
178 if (webmediaplayer_) | 180 if (webmediaplayer_) |
179 webmediaplayer_->OnNeedKey(key_system, session_id, | 181 webmediaplayer_->OnNeedKey(key_system, session_id, type, |
180 init_data.Pass(), init_data_size); | 182 init_data.Pass(), init_data_size); |
181 } | 183 } |
182 | 184 |
183 } // namespace webkit_media | 185 } // namespace webkit_media |
OLD | NEW |