| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/renderer/media/peer_connection_tracker.h" | 4 #include "content/renderer/media/peer_connection_tracker.h" |
| 5 | 5 |
| 6 #include <stddef.h> | 6 #include <stddef.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 return; | 649 return; |
| 650 SendPeerConnectionUpdate(id, "createDTMFSender", | 650 SendPeerConnectionUpdate(id, "createDTMFSender", |
| 651 base::UTF16ToUTF8(base::StringPiece16(track.id()))); | 651 base::UTF16ToUTF8(base::StringPiece16(track.id()))); |
| 652 } | 652 } |
| 653 | 653 |
| 654 void PeerConnectionTracker::TrackGetUserMedia( | 654 void PeerConnectionTracker::TrackGetUserMedia( |
| 655 const blink::WebUserMediaRequest& user_media_request) { | 655 const blink::WebUserMediaRequest& user_media_request) { |
| 656 DCHECK(main_thread_.CalledOnValidThread()); | 656 DCHECK(main_thread_.CalledOnValidThread()); |
| 657 | 657 |
| 658 SendTarget()->Send(new PeerConnectionTrackerHost_GetUserMedia( | 658 SendTarget()->Send(new PeerConnectionTrackerHost_GetUserMedia( |
| 659 user_media_request.securityOrigin().toString().utf8(), | 659 user_media_request.getSecurityOrigin().toString().utf8(), |
| 660 user_media_request.audio(), user_media_request.video(), | 660 user_media_request.audio(), user_media_request.video(), |
| 661 SerializeMediaConstraints(user_media_request.audioConstraints()), | 661 SerializeMediaConstraints(user_media_request.audioConstraints()), |
| 662 SerializeMediaConstraints(user_media_request.videoConstraints()))); | 662 SerializeMediaConstraints(user_media_request.videoConstraints()))); |
| 663 } | 663 } |
| 664 | 664 |
| 665 int PeerConnectionTracker::GetNextLocalID() { | 665 int PeerConnectionTracker::GetNextLocalID() { |
| 666 DCHECK(main_thread_.CalledOnValidThread()); | 666 DCHECK(main_thread_.CalledOnValidThread()); |
| 667 if (next_local_id_< 0) | 667 if (next_local_id_< 0) |
| 668 next_local_id_ = 1; | 668 next_local_id_ = 1; |
| 669 return next_local_id_++; | 669 return next_local_id_++; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 686 DCHECK(main_thread_.CalledOnValidThread()); | 686 DCHECK(main_thread_.CalledOnValidThread()); |
| 687 SendTarget()->Send(new PeerConnectionTrackerHost_UpdatePeerConnection( | 687 SendTarget()->Send(new PeerConnectionTrackerHost_UpdatePeerConnection( |
| 688 local_id, std::string(callback_type), value)); | 688 local_id, std::string(callback_type), value)); |
| 689 } | 689 } |
| 690 | 690 |
| 691 void PeerConnectionTracker::OverrideSendTargetForTesting(RenderThread* target) { | 691 void PeerConnectionTracker::OverrideSendTargetForTesting(RenderThread* target) { |
| 692 send_target_for_test_ = target; | 692 send_target_for_test_ = target; |
| 693 } | 693 } |
| 694 | 694 |
| 695 } // namespace content | 695 } // namespace content |
| OLD | NEW |