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

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

Issue 7272036: Make MediaInternalsUI talk to MediaInternals. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Moving MediaInternalsProxy to its own file. 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
Index: chrome/browser/ui/webui/media_internals_proxy.h
diff --git a/chrome/browser/ui/webui/media_internals_proxy.h b/chrome/browser/ui/webui/media_internals_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a5df037b2b2ffa9186f8cf625ef54f2d832177e
--- /dev/null
+++ b/chrome/browser/ui/webui/media_internals_proxy.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2011 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_UI_WEBUI_MEDIA_INTERNALS_PROXY_H_
+#define CHROME_BROWSER_UI_WEBUI_MEDIA_INTERNALS_PROXY_H_
+#pragma once
+
+#include "base/memory/ref_counted.h"
+#include "base/string16.h"
+#include "chrome/browser/media/media_internals_observer.h"
+
+class IOThread;
+class MediaInternalsUI;
+
+class MediaInternalsProxy
+ : public MediaInternalsObserver,
scherkus (not reviewing) 2011/06/29 17:55:12 docs for class
Scott Franklin 2011/06/29 18:44:33 Done.
+ public base::RefCountedThreadSafe<MediaInternalsProxy> {
+ public:
+ // Methods for MediaInternalsUI. Called on UI thread.
+ MediaInternalsProxy();
scherkus (not reviewing) 2011/06/29 17:55:12 nit: typically have a blank line between the ctor/
Scott Franklin 2011/06/29 18:44:33 Done.
+ void SetUI(MediaInternalsUI* ui);
scherkus (not reviewing) 2011/06/29 17:55:12 why not not pass in the ui in the ctor? then inst
Scott Franklin 2011/06/29 18:44:33 I can't call PostTask in the ctor (which makes sen
+ void RemoveUI();
+ void GetEverything();
scherkus (not reviewing) 2011/06/29 17:55:12 docs for non-interface-implementation methods
Scott Franklin 2011/06/29 18:44:33 Done.
+
+ // 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_;
+};
scherkus (not reviewing) 2011/06/29 17:55:12 DISALLOW etc
Scott Franklin 2011/06/29 18:44:33 Done.
+
+#endif // CHROME_BROWSER_UI_WEBUI_MEDIA_INTERNALS_PROXY_H_
« no previous file with comments | « no previous file | chrome/browser/ui/webui/media_internals_proxy.cc » ('j') | chrome/browser/ui/webui/media_internals_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698