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

Side by Side Diff: content/renderer/pepper/pepper_media_stream_video_track_host.cc

Issue 1083883003: Move BindToCurrentLoop from media/base/ to base/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix media/base/callback_holder.h compile Created 5 years, 8 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 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" 5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind_to_current_loop.h"
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/rand_util.h" 10 #include "base/rand_util.h"
10 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
11 #include "content/renderer/media/media_stream_video_track.h" 12 #include "content/renderer/media/media_stream_video_track.h"
12 #include "media/base/bind_to_current_loop.h"
13 #include "media/base/yuv_convert.h" 13 #include "media/base/yuv_convert.h"
14 #include "ppapi/c/pp_errors.h" 14 #include "ppapi/c/pp_errors.h"
15 #include "ppapi/c/ppb_media_stream_video_track.h" 15 #include "ppapi/c/ppb_media_stream_video_track.h"
16 #include "ppapi/c/ppb_video_frame.h" 16 #include "ppapi/c/ppb_video_frame.h"
17 #include "ppapi/host/dispatch_host_message.h" 17 #include "ppapi/host/dispatch_host_message.h"
18 #include "ppapi/host/host_message_context.h" 18 #include "ppapi/host/host_message_context.h"
19 #include "ppapi/proxy/ppapi_messages.h" 19 #include "ppapi/proxy/ppapi_messages.h"
20 #include "ppapi/shared_impl/media_stream_buffer.h" 20 #include "ppapi/shared_impl/media_stream_buffer.h"
21 21
22 // IS_ALIGNED is also defined in 22 // IS_ALIGNED is also defined in
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 440
441 void PepperMediaStreamVideoTrackHost::StopSourceImpl() { 441 void PepperMediaStreamVideoTrackHost::StopSourceImpl() {
442 output_started_ = false; 442 output_started_ = false;
443 frame_deliverer_ = NULL; 443 frame_deliverer_ = NULL;
444 } 444 }
445 445
446 void PepperMediaStreamVideoTrackHost::DidConnectPendingHostToResource() { 446 void PepperMediaStreamVideoTrackHost::DidConnectPendingHostToResource() {
447 if (!connected_) { 447 if (!connected_) {
448 MediaStreamVideoSink::AddToVideoTrack( 448 MediaStreamVideoSink::AddToVideoTrack(
449 this, 449 this,
450 media::BindToCurrentLoop( 450 base::BindToCurrentLoop(
451 base::Bind( 451 base::Bind(
452 &PepperMediaStreamVideoTrackHost::OnVideoFrame, 452 &PepperMediaStreamVideoTrackHost::OnVideoFrame,
453 weak_factory_.GetWeakPtr())), 453 weak_factory_.GetWeakPtr())),
454 track_); 454 track_);
455 connected_ = true; 455 connected_ = true;
456 } 456 }
457 } 457 }
458 458
459 int32_t PepperMediaStreamVideoTrackHost::OnResourceMessageReceived( 459 int32_t PepperMediaStreamVideoTrackHost::OnResourceMessageReceived(
460 const IPC::Message& msg, 460 const IPC::Message& msg,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 529 }
530 530
531 void PepperMediaStreamVideoTrackHost::OnTrackStarted( 531 void PepperMediaStreamVideoTrackHost::OnTrackStarted(
532 MediaStreamSource* source, 532 MediaStreamSource* source,
533 MediaStreamRequestResult result, 533 MediaStreamRequestResult result,
534 const blink::WebString& result_name) { 534 const blink::WebString& result_name) {
535 DVLOG(3) << "OnTrackStarted result: " << result; 535 DVLOG(3) << "OnTrackStarted result: " << result;
536 } 536 }
537 537
538 } // namespace content 538 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/content_decryptor_delegate.cc ('k') | content/renderer/pepper/pepper_platform_camera_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698