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

Side by Side Diff: webkit/media/webmediaplayer_proxy.cc

Issue 11469040: EME v0.1: Report defaultURL in KeyMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed c&p error and added new check for defaultURL Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « webkit/media/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « webkit/media/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698