| 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_NATIVE_DESKTOP_MEDIA_LIST_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ |
| 6 #define CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ | 6 #define CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_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 10 matching lines...) Expand all Loading... |
| 21 // Implementation of DesktopMediaList that shows native screens and | 21 // Implementation of DesktopMediaList that shows native screens and |
| 22 // native windows. | 22 // native windows. |
| 23 class NativeDesktopMediaList : public DesktopMediaList { | 23 class NativeDesktopMediaList : public DesktopMediaList { |
| 24 public: | 24 public: |
| 25 // Caller may pass NULL for either of the arguments in case when only some | 25 // Caller may pass NULL for either of the arguments in case when only some |
| 26 // types of sources the model should be populated with (e.g. it will only | 26 // types of sources the model should be populated with (e.g. it will only |
| 27 // contain windows, if |screen_capturer| is NULL). | 27 // contain windows, if |screen_capturer| is NULL). |
| 28 NativeDesktopMediaList( | 28 NativeDesktopMediaList( |
| 29 scoped_ptr<webrtc::ScreenCapturer> screen_capturer, | 29 scoped_ptr<webrtc::ScreenCapturer> screen_capturer, |
| 30 scoped_ptr<webrtc::WindowCapturer> window_capturer); | 30 scoped_ptr<webrtc::WindowCapturer> window_capturer); |
| 31 virtual ~NativeDesktopMediaList(); | 31 ~NativeDesktopMediaList() override; |
| 32 | 32 |
| 33 // DesktopMediaList interface. | 33 // DesktopMediaList interface. |
| 34 virtual void SetUpdatePeriod(base::TimeDelta period) override; | 34 void SetUpdatePeriod(base::TimeDelta period) override; |
| 35 virtual void SetThumbnailSize(const gfx::Size& thumbnail_size) override; | 35 void SetThumbnailSize(const gfx::Size& thumbnail_size) override; |
| 36 virtual void StartUpdating(DesktopMediaListObserver* observer) override; | 36 void StartUpdating(DesktopMediaListObserver* observer) override; |
| 37 virtual int GetSourceCount() const override; | 37 int GetSourceCount() const override; |
| 38 virtual const Source& GetSource(int index) const override; | 38 const Source& GetSource(int index) const override; |
| 39 virtual void SetViewDialogWindowId( | 39 void SetViewDialogWindowId(content::DesktopMediaID::Id dialog_id) override; |
| 40 content::DesktopMediaID::Id dialog_id) override; | |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 class Worker; | 42 class Worker; |
| 44 friend class Worker; | 43 friend class Worker; |
| 45 | 44 |
| 46 // Struct used to represent sources list the model gets from the Worker. | 45 // Struct used to represent sources list the model gets from the Worker. |
| 47 struct SourceDescription { | 46 struct SourceDescription { |
| 48 SourceDescription(content::DesktopMediaID id, const base::string16& name); | 47 SourceDescription(content::DesktopMediaID id, const base::string16& name); |
| 49 | 48 |
| 50 content::DesktopMediaID id; | 49 content::DesktopMediaID id; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 91 |
| 93 // Current list of sources. | 92 // Current list of sources. |
| 94 std::vector<Source> sources_; | 93 std::vector<Source> sources_; |
| 95 | 94 |
| 96 base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_; | 95 base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_; |
| 97 | 96 |
| 98 DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaList); | 97 DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaList); |
| 99 }; | 98 }; |
| 100 | 99 |
| 101 #endif // CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ | 100 #endif // CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ |
| OLD | NEW |