Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEDIA_TAB_DESKTOP_MEDIA_LIST_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_TAB_DESKTOP_MEDIA_LIST_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "chrome/browser/media/desktop_media_list_base.h" | |
| 12 | |
| 13 namespace gfx { | |
| 14 class Image; | |
| 15 } | |
| 16 | |
| 17 // Implementation of DesktopMediaList that shows tab/WebContents. | |
| 18 class TabDesktopMediaList : public DesktopMediaListBase { | |
| 19 public: | |
| 20 TabDesktopMediaList(); | |
| 21 ~TabDesktopMediaList() override; | |
| 22 | |
| 23 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.
| |
| 24 std::vector<gfx::Image>& favicons); | |
| 25 | |
| 26 private: | |
| 27 typedef std::map<content::DesktopMediaID, uint32_t> ImageHashesMap; | |
| 28 | |
| 29 void Refresh() override; | |
| 30 | |
| 31 ImageHashesMap favicon_hashes_; | |
| 32 | |
| 33 // For unit tests. | |
| 34 std::vector<SourceDescription> fake_sources_; | |
| 35 std::vector<gfx::Image> fake_favicons_; | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_MEDIA_TAB_DESKTOP_MEDIA_LIST_H_ | |
| OLD | NEW |