OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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_COMBINED_DESKTOP_MEDIA_LIST_H_ |
| 6 #define CHROME_BROWSER_MEDIA_COMBINED_DESKTOP_MEDIA_LIST_H_ |
| 7 |
| 8 #include "base/time/time.h" |
| 9 #include "chrome/browser/media/desktop_media_list.h" |
| 10 #include "chrome/browser/media/desktop_media_list_observer.h" |
| 11 #include "content/public/browser/desktop_media_id.h" |
| 12 |
| 13 class CombinedDesktopMediaList : public DesktopMediaList, |
| 14 public DesktopMediaListObserver { |
| 15 public: |
| 16 CombinedDesktopMediaList(scoped_ptr<DesktopMediaList> list1, |
| 17 scoped_ptr<DesktopMediaList> list2); |
| 18 ~CombinedDesktopMediaList() override; |
| 19 |
| 20 // DesktopMediaList interface. |
| 21 void SetUpdatePeriod(base::TimeDelta period) override; |
| 22 void SetThumbnailSize(const gfx::Size& thumbnail_size) override; |
| 23 void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override; |
| 24 void StartUpdating(DesktopMediaListObserver* observer) override; |
| 25 int GetSourceCount() const override; |
| 26 const Source& GetSource(int index) const override; |
| 27 |
| 28 private: |
| 29 // DesktopMediaListObserver interface. |
| 30 void OnSourceAdded(DesktopMediaList* list, int index) override; |
| 31 void OnSourceRemoved(DesktopMediaList* list, int index) override; |
| 32 void OnSourceMoved(DesktopMediaList* list, |
| 33 int old_index, |
| 34 int new_index) override; |
| 35 void OnSourceNameChanged(DesktopMediaList* list, int index) override; |
| 36 void OnSourceThumbnailChanged(DesktopMediaList* list, int index) override; |
| 37 |
| 38 scoped_ptr<DesktopMediaList> list1_; |
| 39 scoped_ptr<DesktopMediaList> list2_; |
| 40 |
| 41 DesktopMediaListObserver* observer_ = nullptr; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(CombinedDesktopMediaList); |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_MEDIA_COMBINED_DESKTOP_MEDIA_LIST_H_ |
OLD | NEW |