Index: content/browser/media/media_internals_proxy.h |
=================================================================== |
--- content/browser/media/media_internals_proxy.h (revision 179909) |
+++ content/browser/media/media_internals_proxy.h (working copy) |
@@ -2,44 +2,42 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_MEDIA_INTERNALS_PROXY_H_ |
-#define CHROME_BROWSER_UI_WEBUI_MEDIA_MEDIA_INTERNALS_PROXY_H_ |
+#ifndef CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_ |
+#define CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_ |
#include "base/memory/ref_counted.h" |
#include "base/sequenced_task_runner_helpers.h" |
-#include "base/string16.h" |
-#include "chrome/browser/media/media_internals_observer.h" |
+#include "content/browser/media/media_internals.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "net/base/net_log.h" |
-class IOThread; |
-class MediaInternalsMessageHandler; |
- |
namespace base { |
class ListValue; |
class Value; |
} |
+namespace content { |
+class MediaInternalsMessageHandler; |
+ |
// This class is a proxy between MediaInternals (on the IO thread) and |
// MediaInternalsMessageHandler (on the UI thread). |
// It is ref_counted to ensure that it completes all pending Tasks on both |
// threads before destruction. |
class MediaInternalsProxy |
- : public MediaInternalsObserver, |
- public base::RefCountedThreadSafe< |
+ : public base::RefCountedThreadSafe< |
MediaInternalsProxy, |
- content::BrowserThread::DeleteOnUIThread>, |
+ BrowserThread::DeleteOnUIThread>, |
public net::NetLog::ThreadSafeObserver, |
- public content::NotificationObserver { |
+ public NotificationObserver { |
public: |
MediaInternalsProxy(); |
- // content::NotificationObserver implementation. |
+ // NotificationObserver implementation. |
virtual void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) OVERRIDE; |
+ const NotificationSource& source, |
+ const NotificationDetails& details) OVERRIDE; |
// Register a Handler and start receiving callbacks from MediaInternals. |
void Attach(MediaInternalsMessageHandler* handler); |
@@ -50,15 +48,14 @@ |
// Have MediaInternals send all the data it has. |
void GetEverything(); |
- // MediaInternalsObserver implementation. Called on the IO thread. |
- virtual void OnUpdate(const string16& update) OVERRIDE; |
+ // MediaInternals callback. Called on the IO thread. |
+ void OnUpdate(const string16& update); |
// net::NetLog::ThreadSafeObserver implementation. Callable from any thread: |
virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE; |
private: |
- friend struct content::BrowserThread::DeleteOnThread< |
- content::BrowserThread::UI>; |
+ friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
friend class base::DeleteHelper<MediaInternalsProxy>; |
virtual ~MediaInternalsProxy(); |
@@ -81,11 +78,13 @@ |
base::Value* args); |
MediaInternalsMessageHandler* handler_; |
- IOThread* io_thread_; |
scoped_ptr<base::ListValue> pending_net_updates_; |
- content::NotificationRegistrar registrar_; |
+ NotificationRegistrar registrar_; |
+ MediaInternals::UpdateCallback update_callback_; |
DISALLOW_COPY_AND_ASSIGN(MediaInternalsProxy); |
}; |
-#endif // CHROME_BROWSER_UI_WEBUI_MEDIA_MEDIA_INTERNALS_PROXY_H_ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_PROXY_H_ |