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

Unified Diff: content/browser/renderer_host/media/peer_connection_tracker_host.cc

Issue 12089034: Add a WebUIControllerFactory in content and move chrome://webrtc-internals to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/peer_connection_tracker_host.cc
===================================================================
--- content/browser/renderer_host/media/peer_connection_tracker_host.cc (revision 179290)
+++ content/browser/renderer_host/media/peer_connection_tracker_host.cc (working copy)
@@ -4,9 +4,8 @@
#include "content/browser/renderer_host/media/peer_connection_tracker_host.h"
#include "base/process_util.h"
+#include "content/browser/media/webrtc_internals.h"
#include "content/common/media/peer_connection_tracker_messages.h"
-#include "content/public/browser/content_browser_client.h"
-#include "content/public/browser/webrtc_internals.h"
namespace content {
@@ -40,32 +39,26 @@
void PeerConnectionTrackerHost::OnAddPeerConnection(
const PeerConnectionInfo& info) {
- if (!GetContentClient()->browser()->GetWebRTCInternals())
- return;
-
- GetContentClient()->browser()->GetWebRTCInternals()->
- AddPeerConnection(base::GetProcId(peer_handle()),
- info.lid,
- info.url,
- info.servers,
- info.constraints);
+ WebRTCInternals::GetInstance()->AddPeerConnection(
+ base::GetProcId(peer_handle()),
+ info.lid,
+ info.url,
+ info.servers,
+ info.constraints);
}
void PeerConnectionTrackerHost::OnRemovePeerConnection(int lid) {
- if (!GetContentClient()->browser()->GetWebRTCInternals())
- return;
-
- GetContentClient()->browser()->GetWebRTCInternals()->
- RemovePeerConnection(base::GetProcId(peer_handle()), lid);
+ WebRTCInternals::GetInstance()->RemovePeerConnection(
+ base::GetProcId(peer_handle()), lid);
}
void PeerConnectionTrackerHost::OnUpdatePeerConnection(
int lid, const std::string& type, const std::string& value) {
- if (!GetContentClient()->browser()->GetWebRTCInternals())
- return;
-
- GetContentClient()->browser()->GetWebRTCInternals()->
- UpdatePeerConnection(base::GetProcId(peer_handle()), lid, type, value);
+ WebRTCInternals::GetInstance()->UpdatePeerConnection(
+ base::GetProcId(peer_handle()),
+ lid,
+ type,
+ value);
}
} // namespace content
« no previous file with comments | « content/browser/media/webrtc_internals_unittest.cc ('k') | content/browser/webui/content_web_ui_controller_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698