| 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 | 4 |
| 5 #include "content/browser/media/webrtc_internals.h" | 5 #include "content/browser/media/webrtc_internals.h" |
| 6 | 6 |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "content/browser/media/webrtc_internals_ui_observer.h" | 9 #include "content/browser/media/webrtc_internals_ui_observer.h" |
| 10 #include "content/browser/web_contents/web_contents_view.h" | 10 #include "content/browser/web_contents/web_contents_view.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 WebRTCInternals* WebRTCInternals::GetInstance() { | 62 WebRTCInternals* WebRTCInternals::GetInstance() { |
| 63 return Singleton<WebRTCInternals>::get(); | 63 return Singleton<WebRTCInternals>::get(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void WebRTCInternals::OnAddPeerConnection(int render_process_id, | 66 void WebRTCInternals::OnAddPeerConnection(int render_process_id, |
| 67 ProcessId pid, | 67 ProcessId pid, |
| 68 int lid, | 68 int lid, |
| 69 const string& url, | 69 const string& url, |
| 70 const string& servers, | 70 const string& rtc_configuration, |
| 71 const string& constraints) { | 71 const string& constraints) { |
| 72 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 72 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 73 | 73 |
| 74 base::DictionaryValue* dict = new base::DictionaryValue(); | 74 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 75 if (!dict) | 75 if (!dict) |
| 76 return; | 76 return; |
| 77 | 77 |
| 78 dict->SetInteger("rid", render_process_id); | 78 dict->SetInteger("rid", render_process_id); |
| 79 dict->SetInteger("pid", static_cast<int>(pid)); | 79 dict->SetInteger("pid", static_cast<int>(pid)); |
| 80 dict->SetInteger("lid", lid); | 80 dict->SetInteger("lid", lid); |
| 81 dict->SetString("servers", servers); | 81 dict->SetString("rtcConfiguration", rtc_configuration); |
| 82 dict->SetString("constraints", constraints); | 82 dict->SetString("constraints", constraints); |
| 83 dict->SetString("url", url); | 83 dict->SetString("url", url); |
| 84 peer_connection_data_.Append(dict); | 84 peer_connection_data_.Append(dict); |
| 85 | 85 |
| 86 if (observers_.might_have_observers()) | 86 if (observers_.might_have_observers()) |
| 87 SendUpdate("addPeerConnection", dict); | 87 SendUpdate("addPeerConnection", dict); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void WebRTCInternals::OnRemovePeerConnection(ProcessId pid, int lid) { | 90 void WebRTCInternals::OnRemovePeerConnection(ProcessId pid, int lid) { |
| 91 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 91 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 aec_dump_enabled_ = true; | 351 aec_dump_enabled_ = true; |
| 352 for (RenderProcessHost::iterator i( | 352 for (RenderProcessHost::iterator i( |
| 353 content::RenderProcessHost::AllHostsIterator()); | 353 content::RenderProcessHost::AllHostsIterator()); |
| 354 !i.IsAtEnd(); i.Advance()) { | 354 !i.IsAtEnd(); i.Advance()) { |
| 355 i.GetCurrentValue()->EnableAecDump(aec_dump_file_path_); | 355 i.GetCurrentValue()->EnableAecDump(aec_dump_file_path_); |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 #endif | 358 #endif |
| 359 | 359 |
| 360 } // namespace content | 360 } // namespace content |
| OLD | NEW |