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

Unified Diff: chrome/browser/media/tab_desktop_media_list.h

Issue 1622733002: Add CombinedDesktopMediaList class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed for android build Created 4 years, 11 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/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_

Powered by Google App Engine
This is Rietveld 408576698