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

Side by Side Diff: content/browser/media/webrtc/webrtc_internals_message_handler.cc

Issue 1855193002: Move the call to enable the WebRTC event log from PeerConnectionFactory to PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added CONTENT_EXPORT to WebRTCEventLogHost. Created 4 years, 5 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 (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/webrtc_internals_message_handler.h" 5 #include "content/browser/media/webrtc/webrtc_internals_message_handler.h"
6 6
7 #include "content/browser/media/webrtc/webrtc_internals.h" 7 #include "content/browser/media/webrtc/webrtc_internals.h"
8 #include "content/common/media/peer_connection_tracker_messages.h" 8 #include "content/common/media/peer_connection_tracker_messages.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/render_frame_host.h" 10 #include "content/public/browser/render_frame_host.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 WebRTCInternals::GetInstance()->EnableAudioDebugRecordings( 87 WebRTCInternals::GetInstance()->EnableAudioDebugRecordings(
88 web_ui()->GetWebContents()); 88 web_ui()->GetWebContents());
89 } else { 89 } else {
90 WebRTCInternals::GetInstance()->DisableAudioDebugRecordings(); 90 WebRTCInternals::GetInstance()->DisableAudioDebugRecordings();
91 } 91 }
92 } 92 }
93 93
94 void WebRTCInternalsMessageHandler::OnSetEventLogRecordingsEnabled( 94 void WebRTCInternalsMessageHandler::OnSetEventLogRecordingsEnabled(
95 bool enable, 95 bool enable,
96 const base::ListValue* /* unused_list */) { 96 const base::ListValue* /* unused_list */) {
97 WebRTCInternals::GetInstance()->SetEventLogRecordings( 97 if (enable) {
98 enable, enable ? web_ui()->GetWebContents() : nullptr); 98 WebRTCInternals::GetInstance()->EnableEventLogRecordings(
99 web_ui()->GetWebContents());
100 } else {
101 WebRTCInternals::GetInstance()->DisableEventLogRecordings();
102 }
99 } 103 }
100 104
101 void WebRTCInternalsMessageHandler::OnDOMLoadDone( 105 void WebRTCInternalsMessageHandler::OnDOMLoadDone(
102 const base::ListValue* /* unused_list */) { 106 const base::ListValue* /* unused_list */) {
103 WebRTCInternals::GetInstance()->UpdateObserver(this); 107 WebRTCInternals::GetInstance()->UpdateObserver(this);
104 108
105 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) { 109 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) {
106 RenderFrameHost* host = GetWebRTCInternalsHost(); 110 RenderFrameHost* host = GetWebRTCInternalsHost();
107 if (!host) 111 if (!host)
108 return; 112 return;
(...skipping 15 matching lines...) Expand all
124 128
125 std::vector<const base::Value*> args_vector; 129 std::vector<const base::Value*> args_vector;
126 if (args) 130 if (args)
127 args_vector.push_back(args); 131 args_vector.push_back(args);
128 132
129 base::string16 update = WebUI::GetJavascriptCall(command, args_vector); 133 base::string16 update = WebUI::GetJavascriptCall(command, args_vector);
130 host->ExecuteJavaScript(update); 134 host->ExecuteJavaScript(update);
131 } 135 }
132 136
133 } // namespace content 137 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/webrtc/webrtc_internals.cc ('k') | content/browser/renderer_host/media/peer_connection_tracker_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698