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

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

Issue 1554243002: Add CombinedDesktopMediaList. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « no previous file | chrome/browser/media/combined_desktop_media_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/combined_desktop_media_list.h
diff --git a/chrome/browser/media/combined_desktop_media_list.h b/chrome/browser/media/combined_desktop_media_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..1dde15a6920a14c50ce7183cf4187e0ae7ba5b8a
--- /dev/null
+++ b/chrome/browser/media/combined_desktop_media_list.h
@@ -0,0 +1,46 @@
+// Copyright 2015 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_COMBINED_DESKTOP_MEDIA_LIST_H_
+#define CHROME_BROWSER_MEDIA_COMBINED_DESKTOP_MEDIA_LIST_H_
+
+#include "base/time/time.h"
+#include "chrome/browser/media/desktop_media_list.h"
+#include "chrome/browser/media/desktop_media_list_observer.h"
+#include "content/public/browser/desktop_media_id.h"
+
+class CombinedDesktopMediaList : public DesktopMediaList,
+ public DesktopMediaListObserver {
+ public:
+ CombinedDesktopMediaList(scoped_ptr<DesktopMediaList> list1,
+ scoped_ptr<DesktopMediaList> list2);
+ ~CombinedDesktopMediaList() override;
+
+ // DesktopMediaList interface.
+ void SetUpdatePeriod(base::TimeDelta period) override;
+ void SetThumbnailSize(const gfx::Size& thumbnail_size) override;
+ void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override;
+ void StartUpdating(DesktopMediaListObserver* observer) override;
+ int GetSourceCount() const override;
+ const Source& GetSource(int index) const override;
+
+ private:
+ // DesktopMediaListObserver interface.
+ void OnSourceAdded(DesktopMediaList* list, int index) override;
+ void OnSourceRemoved(DesktopMediaList* list, int index) override;
+ void OnSourceMoved(DesktopMediaList* list,
+ int old_index,
+ int new_index) override;
+ void OnSourceNameChanged(DesktopMediaList* list, int index) override;
+ void OnSourceThumbnailChanged(DesktopMediaList* list, int index) override;
+
+ scoped_ptr<DesktopMediaList> list1_;
+ scoped_ptr<DesktopMediaList> list2_;
+
+ DesktopMediaListObserver* observer_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(CombinedDesktopMediaList);
+};
+
+#endif // CHROME_BROWSER_MEDIA_COMBINED_DESKTOP_MEDIA_LIST_H_
« no previous file with comments | « no previous file | chrome/browser/media/combined_desktop_media_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698