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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 if (webmediaplayer_) | 157 if (webmediaplayer_) |
158 webmediaplayer_->OnKeyError(key_system, session_id, | 158 webmediaplayer_->OnKeyError(key_system, session_id, |
159 error_code, system_code); | 159 error_code, system_code); |
160 } | 160 } |
161 | 161 |
162 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system, | 162 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system, |
163 const std::string& session_id, | 163 const std::string& session_id, |
164 const std::string& message, | 164 const std::string& message, |
165 const std::string& default_url) { | 165 const std::string& default_url) { |
166 DCHECK(render_loop_->BelongsToCurrentThread()); | 166 DCHECK(render_loop_->BelongsToCurrentThread()); |
167 if (webmediaplayer_) | 167 if (webmediaplayer_) { |
168 webmediaplayer_->OnKeyMessage(key_system, session_id, message, default_url); | 168 const GURL default_url_gurl(default_url); |
| 169 DLOG_IF(WARNING, !default_url.empty() && !default_url_gurl.is_valid()) |
| 170 << "Invalid URL in default_url: " << default_url; |
| 171 webmediaplayer_->OnKeyMessage(key_system, session_id, message, |
| 172 default_url_gurl); |
| 173 } |
169 } | 174 } |
170 | 175 |
171 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, | 176 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, |
172 const std::string& session_id, | 177 const std::string& session_id, |
173 const std::string& type, | 178 const std::string& type, |
174 scoped_array<uint8> init_data, | 179 scoped_array<uint8> init_data, |
175 int init_data_size) { | 180 int init_data_size) { |
176 DCHECK(render_loop_->BelongsToCurrentThread()); | 181 DCHECK(render_loop_->BelongsToCurrentThread()); |
177 if (webmediaplayer_) | 182 if (webmediaplayer_) |
178 webmediaplayer_->OnNeedKey(key_system, session_id, type, | 183 webmediaplayer_->OnNeedKey(key_system, session_id, type, |
179 init_data.Pass(), init_data_size); | 184 init_data.Pass(), init_data_size); |
180 } | 185 } |
181 | 186 |
182 } // namespace webkit_media | 187 } // namespace webkit_media |
OLD | NEW |