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

Unified Diff: chrome/browser/ui/webui/media_internals_ui.h

Issue 7272036: Make MediaInternalsUI talk to MediaInternals. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 6 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 | « no previous file | chrome/browser/ui/webui/media_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/media_internals_ui.h
diff --git a/chrome/browser/ui/webui/media_internals_ui.h b/chrome/browser/ui/webui/media_internals_ui.h
index ea5eeaddb3d6fabd08fb0b803665133d739c863c..be743e5e369e2f57a037906c057532e1a82b9188 100644
--- a/chrome/browser/ui/webui/media_internals_ui.h
+++ b/chrome/browser/ui/webui/media_internals_ui.h
@@ -8,12 +8,53 @@
#include "chrome/browser/ui/webui/chrome_web_ui.h"
scherkus (not reviewing) 2011/06/29 01:03:07 a/z ordering for includes
Scott Franklin 2011/06/29 17:35:23 Done.
+#include "base/memory/ref_counted.h"
+#include "chrome/browser/media/media_internals_observer.h"
+
+class MediaInternalsUI;
scherkus (not reviewing) 2011/06/29 01:03:07 a/z ordering
Scott Franklin 2011/06/29 17:35:23 Done.
+class IOThread;
+
+class MediaInternalsProxy
+ : public MediaInternalsObserver,
+ public base::RefCountedThreadSafe<MediaInternalsProxy> {
+ public:
+ // Methods for MediaInternalsUI. Called on UI thread.
+ MediaInternalsProxy();
+ void SetUI(MediaInternalsUI* ui);
+ void RemoveUI();
+ void GetEverything();
+
+ // MediaInternalsObserver implementation. Called on IO thread.
+ virtual void OnUpdate(const string16& update);
+
+ private:
+ friend class base::RefCountedThreadSafe<MediaInternalsProxy>;
+ virtual ~MediaInternalsProxy();
+
+ void ObserveMediaInternalsOnIOThread();
+ void StopObservingMediaInternalsOnIOThread();
+ void GetEverythingOnIOThread();
+ void UpdateUIOnUIThread(const string16& update);
+
+ MediaInternalsUI* ui_;
+ IOThread* io_thread_;
+};
+
// The implementation for the chrome://media-internals page.
class MediaInternalsUI : public ChromeWebUI {
public:
explicit MediaInternalsUI(TabContents* contents);
+ virtual ~MediaInternalsUI();
+
+ virtual void OnWebUISend(const GURL& source_url,
+ const std::string& name,
+ const ListValue& args) OVERRIDE;
+
+ virtual void OnUpdate(const string16& update);
private:
+ scoped_refptr<MediaInternalsProxy> proxy_;
+
DISALLOW_COPY_AND_ASSIGN(MediaInternalsUI);
};
« no previous file with comments | « no previous file | chrome/browser/ui/webui/media_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698