Index: chrome/browser/media/tab_desktop_media_list.h |
diff --git a/chrome/browser/media/tab_desktop_media_list.h b/chrome/browser/media/tab_desktop_media_list.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..73d0909e02435a5f3749b094a25afcb00fbebb99 |
--- /dev/null |
+++ b/chrome/browser/media/tab_desktop_media_list.h |
@@ -0,0 +1,38 @@ |
+// Copyright 2016 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_MEDIA_TAB_DESKTOP_MEDIA_LIST_H_ |
+#define CHROME_BROWSER_MEDIA_TAB_DESKTOP_MEDIA_LIST_H_ |
+ |
+#include <map> |
+#include <vector> |
+ |
+#include "chrome/browser/media/desktop_media_list_base.h" |
+ |
+namespace gfx { |
+class Image; |
+} |
+ |
+// Implementation of DesktopMediaList that shows tab/WebContents. |
+class TabDesktopMediaList : public DesktopMediaListBase { |
+ public: |
+ TabDesktopMediaList(); |
+ ~TabDesktopMediaList() override; |
+ |
+ void SetFakeSourcesForTesting(std::vector<SourceDescription>& sources, |
qiangchen
2016/01/26 01:01:50
Put ForTesting function in private and add the cla
GeorgeZ
2016/01/27 00:17:39
Done.
|
+ std::vector<gfx::Image>& favicons); |
+ |
+ private: |
+ typedef std::map<content::DesktopMediaID, uint32_t> ImageHashesMap; |
+ |
+ void Refresh() override; |
+ |
+ ImageHashesMap favicon_hashes_; |
+ |
+ // For unit tests. |
+ std::vector<SourceDescription> fake_sources_; |
+ std::vector<gfx::Image> fake_favicons_; |
+}; |
+ |
+#endif // CHROME_BROWSER_MEDIA_TAB_DESKTOP_MEDIA_LIST_H_ |