Chromium Code Reviews| Index: chrome/browser/media/chrome_webrtc_internals.h |
| diff --git a/content/browser/media/webrtc_internals.h b/chrome/browser/media/chrome_webrtc_internals.h |
| similarity index 53% |
| rename from content/browser/media/webrtc_internals.h |
| rename to chrome/browser/media/chrome_webrtc_internals.h |
| index 50db3dae6219aa564f8ac9687e43eb7295b5d45e..f4e4c0af9edab0b295bf168a8a6eab065ed33e29 100644 |
| --- a/content/browser/media/webrtc_internals.h |
| +++ b/chrome/browser/media/chrome_webrtc_internals.h |
| @@ -2,18 +2,14 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ |
| -#define CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ |
| +#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/common/content_export.h" |
| - |
| -struct PeerConnectionInfo; |
| - |
| -namespace content { |
| +#include "content/public/browser/webrtc_internals.h" |
| class WebRTCInternalsUIObserver; |
| @@ -21,32 +17,34 @@ class WebRTCInternalsUIObserver; |
| // It collects peer connection infomation from the renderers, |
| // forwards the data to WebRTCInternalsUIObserver and |
| // sends data collecting commands to the renderers. |
| -class CONTENT_EXPORT WebRTCInternals { |
| +class ChromeWebRTCInternals : public content::WebRTCInternals { |
| public: |
| - static WebRTCInternals* GetInstance(); |
| + static ChromeWebRTCInternals* GetInstance(); |
| // Methods called when peer connection status changes. |
|
jam
2013/01/18 22:23:45
nit: don't document overridden methods. just say
jiayl
2013/01/18 22:39:51
Done.
|
| - void AddPeerConnection(base::ProcessId pid, const PeerConnectionInfo& info); |
| - void RemovePeerConnection(base::ProcessId pid, int lid); |
| + 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; |
| // Methods for adding or removing WebRTCInternalsUIObserver. |
| void AddObserver(WebRTCInternalsUIObserver *observer); |
| void RemoveObserver(WebRTCInternalsUIObserver *observer); |
| private: |
| - friend struct DefaultSingletonTraits<WebRTCInternals>; |
| + friend struct DefaultSingletonTraits<ChromeWebRTCInternals>; |
| - WebRTCInternals(); |
| - virtual ~WebRTCInternals(); |
| + ChromeWebRTCInternals(); |
| + virtual ~ChromeWebRTCInternals(); |
| // Send updates to observers on UI thread. |
| void SendUpdate(const std::string& command, base::Value* value); |
| - // Only the IO thread should access these fields. |
| + // Only the UI thread should access these fields. |
|
jam
2013/01/18 22:23:45
nit: this class is now always used on the UI threa
jiayl
2013/01/18 22:39:51
Done.
|
| ObserverList<WebRTCInternalsUIObserver> observers_; |
| base::ListValue peer_connection_data_; |
| }; |
| -} // namespace content |
| - |
| -#endif // CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ |
| +#endif // CHROME_BROWSER_MEDIA_CHROME_WEBRTC_INTERNALS_H_ |