OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ |
6 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ | 6 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Implementation of DesktopMediaList that shows native screens and | 30 // Implementation of DesktopMediaList that shows native screens and |
31 // native windows. | 31 // native windows. |
32 class DesktopMediaListAsh : public DesktopMediaList { | 32 class DesktopMediaListAsh : public DesktopMediaList { |
33 public: | 33 public: |
34 enum SourceTypes { | 34 enum SourceTypes { |
35 SCREENS = 1, | 35 SCREENS = 1, |
36 WINDOWS = 2, | 36 WINDOWS = 2, |
37 }; | 37 }; |
38 | 38 |
39 explicit DesktopMediaListAsh(int source_types); | 39 explicit DesktopMediaListAsh(int source_types); |
40 virtual ~DesktopMediaListAsh(); | 40 ~DesktopMediaListAsh() override; |
41 | 41 |
42 // DesktopMediaList interface. | 42 // DesktopMediaList interface. |
43 virtual void SetUpdatePeriod(base::TimeDelta period) override; | 43 void SetUpdatePeriod(base::TimeDelta period) override; |
44 virtual void SetThumbnailSize(const gfx::Size& thumbnail_size) override; | 44 void SetThumbnailSize(const gfx::Size& thumbnail_size) override; |
45 virtual void StartUpdating(DesktopMediaListObserver* observer) override; | 45 void StartUpdating(DesktopMediaListObserver* observer) override; |
46 virtual int GetSourceCount() const override; | 46 int GetSourceCount() const override; |
47 virtual const Source& GetSource(int index) const override; | 47 const Source& GetSource(int index) const override; |
48 virtual void SetViewDialogWindowId( | 48 void SetViewDialogWindowId(content::DesktopMediaID::Id dialog_id) override; |
49 content::DesktopMediaID::Id dialog_id) override; | |
50 | 49 |
51 private: | 50 private: |
52 // Struct used to represent sources list the model gets from the Worker. | 51 // Struct used to represent sources list the model gets from the Worker. |
53 struct SourceDescription { | 52 struct SourceDescription { |
54 SourceDescription(content::DesktopMediaID id, const base::string16& name); | 53 SourceDescription(content::DesktopMediaID id, const base::string16& name); |
55 | 54 |
56 content::DesktopMediaID id; | 55 content::DesktopMediaID id; |
57 base::string16 name; | 56 base::string16 name; |
58 }; | 57 }; |
59 | 58 |
(...skipping 30 matching lines...) Expand all Loading... |
90 std::vector<Source> sources_; | 89 std::vector<Source> sources_; |
91 | 90 |
92 int pending_window_capture_requests_; | 91 int pending_window_capture_requests_; |
93 | 92 |
94 base::WeakPtrFactory<DesktopMediaListAsh> weak_factory_; | 93 base::WeakPtrFactory<DesktopMediaListAsh> weak_factory_; |
95 | 94 |
96 DISALLOW_COPY_AND_ASSIGN(DesktopMediaListAsh); | 95 DISALLOW_COPY_AND_ASSIGN(DesktopMediaListAsh); |
97 }; | 96 }; |
98 | 97 |
99 #endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ | 98 #endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ |
OLD | NEW |