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

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

Issue 1808273002: Use DesktopCaptureDeviceAura for all aura windows in Windows and Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: chrome/browser/media/native_desktop_media_list.h
diff --git a/chrome/browser/media/native_desktop_media_list.h b/chrome/browser/media/native_desktop_media_list.h
index 138c85cdad53beb052eb725a95cf56cb70addd0d..1da648f56f3f9d37a41a2cc78cfc219f722adeb9 100644
--- a/chrome/browser/media/native_desktop_media_list.h
+++ b/chrome/browser/media/native_desktop_media_list.h
@@ -21,9 +21,6 @@ class WindowCapturer;
// native windows.
class NativeDesktopMediaList : public DesktopMediaListBase {
public:
- typedef std::map<content::DesktopMediaID::Id, content::DesktopMediaID::Id>
- NativeAuraIdMap;
-
// Caller may pass NULL for either of the arguments in case when only some
// types of sources the model should be populated with (e.g. it will only
// contain windows, if |screen_capturer| is NULL).
@@ -38,16 +35,12 @@ class NativeDesktopMediaList : public DesktopMediaListBase {
class Worker;
friend class Worker;
- // Refresh() posts a task for the |worker_| to update list of windows and get
- // thumbnails. Then |worker_| first posts tasks for
- // UpdateObserverSourcesList() with fresh list of sources, then follows with
- // OnSourceThumbnail() for each changed thumbnail and then calls
- // DelayLaunchNextRefersh() at the end.
+ // Refresh() posts a task for the |worker_| to update list of windows, get
+ // thumbnails and schedule next refresh.
void Refresh() override;
- void OnSourceThumbnailCaptured(int index, const gfx::ImageSkia& image);
- void FinishRefreshOnUiThreadAndScheduleNext(
- const std::vector<content::DesktopMediaID>& aura_ids);
+ void RefreshForAuraWindows(std::vector<SourceDescription> sources);
+ void UpdateNativeThumbnailsFinished();
#if defined(USE_AURA)
void CaptureAuraWindowThumbnail(const content::DesktopMediaID& id);
@@ -71,7 +64,8 @@ class NativeDesktopMediaList : public DesktopMediaListBase {
ImageHashesMap previous_aura_thumbnail_hashes_;
ImageHashesMap new_aura_thumbnail_hashes_;
- int pending_aura_capture_requests_;
+ int pending_aura_capture_requests_ = 0;
+ bool pending_native_thumbnail_capture_ = true;
Sergey Ulanov 2016/03/21 20:55:00 I think you want to initialize it to false. It's n
#endif
base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_;
« no previous file with comments | « no previous file | chrome/browser/media/native_desktop_media_list.cc » ('j') | chrome/browser/media/native_desktop_media_list.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698