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

Unified Diff: content/browser/media/webrtc_internals.h

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
« no previous file with comments | « content/browser/media/resources/webrtc_internals.js ('k') | content/browser/media/webrtc_internals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/webrtc_internals.h
===================================================================
--- content/browser/media/webrtc_internals.h (revision 179210)
+++ content/browser/media/webrtc_internals.h (working copy)
@@ -2,36 +2,49 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_
-#define CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_
+#ifndef CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_
+#define CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "base/process.h"
#include "base/values.h"
-#include "content/public/browser/webrtc_internals.h"
+#include "content/common/content_export.h"
+namespace content {
class WebRTCInternalsUIObserver;
// This is a singleton class running in the browser UI thread.
// It collects peer connection infomation from the renderers,
// forwards the data to WebRTCInternalsUIObserver and
// sends data collecting commands to the renderers.
-class ChromeWebRTCInternals : public content::WebRTCInternals {
+class CONTENT_EXPORT WebRTCInternals {
public:
- static ChromeWebRTCInternals* GetInstance();
+ static WebRTCInternals* GetInstance();
- virtual void AddPeerConnection(base::ProcessId pid,
- int lid,
- const std::string& url,
- const std::string& servers,
- const std::string& constraints) OVERRIDE;
- virtual void RemovePeerConnection(base::ProcessId pid, int lid) OVERRIDE;
- virtual void UpdatePeerConnection(base::ProcessId pid,
- int lid,
- const std::string& type,
- const std::string& value) OVERRIDE;
+ // This method is called when a PeerConnection is created.
+ // |pid| is the renderer process id, |lid| is the renderer local id used to
+ // identify a PeerConnection, |url| is the url of the tab owning the
+ // PeerConnection, |servers| is the servers configuration, |constraints| is
+ // the media constraints used to initialize the PeerConnection.
+ void AddPeerConnection(base::ProcessId pid,
+ int lid,
+ const std::string& url,
+ const std::string& servers,
+ const std::string& constraints);
+ // This method is called when PeerConnection is destroyed.
+ // |pid| is the renderer process id, |lid| is the renderer local id.
+ void RemovePeerConnection(base::ProcessId pid, int lid);
+
+ // This method is called when a PeerConnection is updated.
+ // |pid| is the renderer process id, |lid| is the renderer local id,
+ // |type| is the update type, |value| is the detail of the update.
+ void UpdatePeerConnection(base::ProcessId pid,
+ int lid,
+ const std::string& type,
+ const std::string& value);
+
// Methods for adding or removing WebRTCInternalsUIObserver.
void AddObserver(WebRTCInternalsUIObserver *observer);
void RemoveObserver(WebRTCInternalsUIObserver *observer);
@@ -40,10 +53,10 @@
void SendAllUpdates();
private:
- friend struct DefaultSingletonTraits<ChromeWebRTCInternals>;
+ friend struct DefaultSingletonTraits<WebRTCInternals>;
- ChromeWebRTCInternals();
- virtual ~ChromeWebRTCInternals();
+ WebRTCInternals();
+ virtual ~WebRTCInternals();
void SendUpdate(const std::string& command, base::Value* value);
@@ -64,4 +77,6 @@
base::ListValue peer_connection_data_;
};
-#endif // CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_
« no previous file with comments | « content/browser/media/resources/webrtc_internals.js ('k') | content/browser/media/webrtc_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698