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

Side by Side Diff: content/renderer/media/crypto/ppapi_decryptor.cc

Issue 297703002: Using GURL in place of std::string for destination_url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments, adding checks Created 6 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/crypto/ppapi_decryptor.h" 5 #include "content/renderer/media/crypto/ppapi_decryptor.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 354 }
355 355
356 void PpapiDecryptor::OnSessionCreated(uint32 session_id, 356 void PpapiDecryptor::OnSessionCreated(uint32 session_id,
357 const std::string& web_session_id) { 357 const std::string& web_session_id) {
358 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 358 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
359 session_created_cb_.Run(session_id, web_session_id); 359 session_created_cb_.Run(session_id, web_session_id);
360 } 360 }
361 361
362 void PpapiDecryptor::OnSessionMessage(uint32 session_id, 362 void PpapiDecryptor::OnSessionMessage(uint32 session_id,
363 const std::vector<uint8>& message, 363 const std::vector<uint8>& message,
364 const std::string& destination_url) { 364 const GURL& destination_url) {
365 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 365 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
366 session_message_cb_.Run(session_id, message, destination_url); 366 session_message_cb_.Run(session_id, message, destination_url);
367 } 367 }
368 368
369 void PpapiDecryptor::OnSessionReady(uint32 session_id) { 369 void PpapiDecryptor::OnSessionReady(uint32 session_id) {
370 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 370 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
371 371
372 // Based on the spec, we need to resume playback when update() completes 372 // Based on the spec, we need to resume playback when update() completes
373 // successfully, or when a session is successfully loaded. In both cases, 373 // successfully, or when a session is successfully loaded. In both cases,
374 // the CDM fires OnSessionReady() event. So we choose to call the NewKeyCBs 374 // the CDM fires OnSessionReady() event. So we choose to call the NewKeyCBs
(...skipping 25 matching lines...) Expand all
400 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 400 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
401 pepper_cdm_wrapper_.reset(); 401 pepper_cdm_wrapper_.reset();
402 } 402 }
403 403
404 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { 404 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() {
405 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 405 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
406 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; 406 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL;
407 } 407 }
408 408
409 } // namespace content 409 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698