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_ |