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

Side by Side Diff: chrome/browser/media/chrome_webrtc_internals.h

Issue 11876007: Connecting webrtc-internals WebUI frontend with the backend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@main
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_
6 #define CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_
7
8 #include "base/memory/singleton.h"
9 #include "base/observer_list.h"
10 #include "base/process.h"
11 #include "base/values.h"
12 #include "content/public/browser/webrtc_internals.h"
13
14 class WebRTCInternalsUIObserver;
15
16 // This is a singleton class running in the browser UI thread.
17 // It collects peer connection infomation from the renderers,
18 // forwards the data to WebRTCInternalsUIObserver and
19 // sends data collecting commands to the renderers.
20 class ChromeWebRTCInternals : public content::WebRTCInternals {
21 public:
22 static ChromeWebRTCInternals* GetInstance();
23
24 virtual void AddPeerConnection(base::ProcessId pid,
25 int lid,
26 const std::string& url,
27 const std::string& servers,
28 const std::string& constraints) OVERRIDE;
29 virtual void RemovePeerConnection(base::ProcessId pid, int lid) OVERRIDE;
30
31 // Methods for adding or removing WebRTCInternalsUIObserver.
32 void AddObserver(WebRTCInternalsUIObserver *observer);
33 void RemoveObserver(WebRTCInternalsUIObserver *observer);
34
35 private:
36 friend struct DefaultSingletonTraits<ChromeWebRTCInternals>;
37
38 ChromeWebRTCInternals();
39 virtual ~ChromeWebRTCInternals();
40
41 void SendUpdate(const std::string& command, base::Value* value);
42
43 ObserverList<WebRTCInternalsUIObserver> observers_;
44 base::ListValue peer_connection_data_;
45 };
46
47 #endif // CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_
OLDNEW
« 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