| 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 13 matching lines...) Expand all Loading... |
| 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 virtual ~NativeDesktopMediaList(); |
| 32 | 32 |
| 33 // DesktopMediaList interface. | 33 // DesktopMediaList interface. |
| 34 virtual void SetUpdatePeriod(base::TimeDelta period) OVERRIDE; | 34 virtual void SetUpdatePeriod(base::TimeDelta period) override; |
| 35 virtual void SetThumbnailSize(const gfx::Size& thumbnail_size) OVERRIDE; | 35 virtual void SetThumbnailSize(const gfx::Size& thumbnail_size) override; |
| 36 virtual void StartUpdating(DesktopMediaListObserver* observer) OVERRIDE; | 36 virtual void StartUpdating(DesktopMediaListObserver* observer) override; |
| 37 virtual int GetSourceCount() const OVERRIDE; | 37 virtual int GetSourceCount() const override; |
| 38 virtual const Source& GetSource(int index) const OVERRIDE; | 38 virtual const Source& GetSource(int index) const override; |
| 39 virtual void SetViewDialogWindowId( | 39 virtual void SetViewDialogWindowId( |
| 40 content::DesktopMediaID::Id dialog_id) OVERRIDE; | 40 content::DesktopMediaID::Id dialog_id) override; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 class Worker; | 43 class Worker; |
| 44 friend class Worker; | 44 friend class Worker; |
| 45 | 45 |
| 46 // Struct used to represent sources list the model gets from the Worker. | 46 // Struct used to represent sources list the model gets from the Worker. |
| 47 struct SourceDescription { | 47 struct SourceDescription { |
| 48 SourceDescription(content::DesktopMediaID id, const base::string16& name); | 48 SourceDescription(content::DesktopMediaID id, const base::string16& name); |
| 49 | 49 |
| 50 content::DesktopMediaID id; | 50 content::DesktopMediaID id; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 // Current list of sources. | 93 // Current list of sources. |
| 94 std::vector<Source> sources_; | 94 std::vector<Source> sources_; |
| 95 | 95 |
| 96 base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_; | 96 base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaList); | 98 DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaList); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 #endif // CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ | 101 #endif // CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ |
| OLD | NEW |