| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ | |
| 7 | |
| 8 #include "base/memory/weak_ptr.h" | |
| 9 #include "chrome/browser/media/desktop_media_list_base.h" | |
| 10 #include "content/public/browser/desktop_media_id.h" | |
| 11 | |
| 12 namespace aura { | |
| 13 class Window; | |
| 14 } | |
| 15 | |
| 16 namespace gfx { | |
| 17 class Image; | |
| 18 } | |
| 19 | |
| 20 // Implementation of DesktopMediaList that shows native screens and | |
| 21 // native windows. | |
| 22 class DesktopMediaListAsh : public DesktopMediaListBase { | |
| 23 public: | |
| 24 enum SourceTypes { | |
| 25 SCREENS = 1, | |
| 26 WINDOWS = 2, | |
| 27 }; | |
| 28 | |
| 29 explicit DesktopMediaListAsh(int source_types); | |
| 30 ~DesktopMediaListAsh() override; | |
| 31 | |
| 32 private: | |
| 33 // Override from DesktopMediaListBase. | |
| 34 void Refresh() override; | |
| 35 void EnumerateWindowsForRoot( | |
| 36 std::vector<DesktopMediaListAsh::SourceDescription>* windows, | |
| 37 aura::Window* root_window, | |
| 38 int container_id); | |
| 39 void EnumerateSources( | |
| 40 std::vector<DesktopMediaListAsh::SourceDescription>* windows); | |
| 41 void CaptureThumbnail(content::DesktopMediaID id, aura::Window* window); | |
| 42 void OnThumbnailCaptured(content::DesktopMediaID id, | |
| 43 const gfx::Image& image); | |
| 44 | |
| 45 int source_types_; | |
| 46 | |
| 47 int pending_window_capture_requests_; | |
| 48 | |
| 49 base::WeakPtrFactory<DesktopMediaListAsh> weak_factory_; | |
| 50 | |
| 51 DISALLOW_COPY_AND_ASSIGN(DesktopMediaListAsh); | |
| 52 }; | |
| 53 | |
| 54 #endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ | |
| OLD | NEW |