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

Unified Diff: chrome/browser/media/chrome_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 | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/media/chrome_webrtc_internals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/chrome_webrtc_internals.h
===================================================================
--- chrome/browser/media/chrome_webrtc_internals.h (revision 179290)
+++ chrome/browser/media/chrome_webrtc_internals.h (working copy)
@@ -1,67 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// 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_
-
-#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"
-
-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 {
- public:
- static ChromeWebRTCInternals* 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;
-
- // Methods for adding or removing WebRTCInternalsUIObserver.
- void AddObserver(WebRTCInternalsUIObserver *observer);
- void RemoveObserver(WebRTCInternalsUIObserver *observer);
-
- // Sends all update data to the observers.
- void SendAllUpdates();
-
- private:
- friend struct DefaultSingletonTraits<ChromeWebRTCInternals>;
-
- ChromeWebRTCInternals();
- virtual ~ChromeWebRTCInternals();
-
- void SendUpdate(const std::string& command, base::Value* value);
-
- ObserverList<WebRTCInternalsUIObserver> observers_;
-
- // |peer_connection_data_| is a list containing all the PeerConnection
- // updates.
- // Each item of the list represents the data for one PeerConnection, which
- // contains these fields:
- // "pid" -- processId of the renderer that creates the PeerConnection.
- // "lid" -- local Id assigned to the PeerConnection.
- // "url" -- url of the web page that created the PeerConnection.
- // "servers" and "constraints" -- server configuration and media constraints
- // used to initialize the PeerConnection respectively.
- // "log" -- a ListValue contains all the updates for the PeerConnection. Each
- // list item is a DictionaryValue containing "type" and "value", both of which
- // are strings.
- base::ListValue peer_connection_data_;
-};
-
-#endif // CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/media/chrome_webrtc_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698