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_WEBRTC_TAB_DESKTOP_MEDIA_LIST_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_TAB_DESKTOP_MEDIA_LIST_H_
7 
8 #include "chrome/browser/media/webrtc/desktop_media_list_base.h"
9 
10 // Implementation of DesktopMediaList that shows tab/WebContents.
11 class TabDesktopMediaList : public DesktopMediaListBase {
12  public:
13   TabDesktopMediaList();
14   ~TabDesktopMediaList() override;
15 
16  private:
17   typedef std::map<content::DesktopMediaID, uint32_t> ImageHashesMap;
18 
19   void Refresh(bool update_thumnails) override;
20 
21   ImageHashesMap favicon_hashes_;
22 
23   // Task runner used for the |worker_|.
24   scoped_refptr<base::SequencedTaskRunner> thumbnail_task_runner_;
25 
26   base::WeakPtrFactory<TabDesktopMediaList> weak_factory_{this};
27 
28   DISALLOW_COPY_AND_ASSIGN(TabDesktopMediaList);
29 };
30 
31 #endif  // CHROME_BROWSER_MEDIA_WEBRTC_TAB_DESKTOP_MEDIA_LIST_H_
32