| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 private: | 449 private: |
| 450 const base::WeakPtr<PepperMediaStreamVideoTrackHost> host_; | 450 const base::WeakPtr<PepperMediaStreamVideoTrackHost> host_; |
| 451 | 451 |
| 452 DISALLOW_COPY_AND_ASSIGN(VideoSource); | 452 DISALLOW_COPY_AND_ASSIGN(VideoSource); |
| 453 }; | 453 }; |
| 454 | 454 |
| 455 void PepperMediaStreamVideoTrackHost::DidConnectPendingHostToResource() { | 455 void PepperMediaStreamVideoTrackHost::DidConnectPendingHostToResource() { |
| 456 if (!MediaStreamVideoSink::connected_track().isNull()) | 456 if (!MediaStreamVideoSink::connected_track().isNull()) |
| 457 return; | 457 return; |
| 458 MediaStreamVideoSink::ConnectToTrack( | 458 MediaStreamVideoSink::ConnectToTrack( |
| 459 track_, | 459 track_, media::BindToCurrentLoop( |
| 460 media::BindToCurrentLoop( | 460 base::Bind(&PepperMediaStreamVideoTrackHost::OnVideoFrame, |
| 461 base::Bind( | 461 weak_factory_.GetWeakPtr())), |
| 462 &PepperMediaStreamVideoTrackHost::OnVideoFrame, | 462 false); |
| 463 weak_factory_.GetWeakPtr()))); | |
| 464 } | 463 } |
| 465 | 464 |
| 466 int32_t PepperMediaStreamVideoTrackHost::OnResourceMessageReceived( | 465 int32_t PepperMediaStreamVideoTrackHost::OnResourceMessageReceived( |
| 467 const IPC::Message& msg, | 466 const IPC::Message& msg, |
| 468 HostMessageContext* context) { | 467 HostMessageContext* context) { |
| 469 PPAPI_BEGIN_MESSAGE_MAP(PepperMediaStreamVideoTrackHost, msg) | 468 PPAPI_BEGIN_MESSAGE_MAP(PepperMediaStreamVideoTrackHost, msg) |
| 470 PPAPI_DISPATCH_HOST_RESOURCE_CALL( | 469 PPAPI_DISPATCH_HOST_RESOURCE_CALL( |
| 471 PpapiHostMsg_MediaStreamVideoTrack_Configure, OnHostMsgConfigure) | 470 PpapiHostMsg_MediaStreamVideoTrack_Configure, OnHostMsgConfigure) |
| 472 PPAPI_END_MESSAGE_MAP() | 471 PPAPI_END_MESSAGE_MAP() |
| 473 return PepperMediaStreamTrackHostBase::OnResourceMessageReceived(msg, | 472 return PepperMediaStreamTrackHostBase::OnResourceMessageReceived(msg, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 } | 539 } |
| 541 | 540 |
| 542 void PepperMediaStreamVideoTrackHost::OnTrackStarted( | 541 void PepperMediaStreamVideoTrackHost::OnTrackStarted( |
| 543 MediaStreamSource* source, | 542 MediaStreamSource* source, |
| 544 MediaStreamRequestResult result, | 543 MediaStreamRequestResult result, |
| 545 const blink::WebString& result_name) { | 544 const blink::WebString& result_name) { |
| 546 DVLOG(3) << "OnTrackStarted result: " << result; | 545 DVLOG(3) << "OnTrackStarted result: " << result; |
| 547 } | 546 } |
| 548 | 547 |
| 549 } // namespace content | 548 } // namespace content |
| OLD | NEW |