| 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 f3635e55f5088238412f59396ed265c83fd21097..821665c3469b7a2b860dc0c6adc4455aa11d5fc9 100644
|
| --- a/chrome/browser/media/native_desktop_media_list.h
|
| +++ b/chrome/browser/media/native_desktop_media_list.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/sequenced_task_runner.h"
|
| #include "chrome/browser/media/desktop_media_list_base.h"
|
| #include "content/public/browser/desktop_media_id.h"
|
| +#include "ui/gfx/image/image.h"
|
|
|
| namespace webrtc {
|
| class ScreenCapturer;
|
| @@ -29,6 +30,9 @@ class NativeDesktopMediaList : public DesktopMediaListBase {
|
| ~NativeDesktopMediaList() override;
|
|
|
| private:
|
| + typedef std::map<DesktopMediaID::Id, DesktopMediaID::Id> NativeAuraIdMap;
|
| + typedef std::map<DesktopMediaID, uint32_t> ImageHashesMap;
|
| +
|
| class Worker;
|
| friend class Worker;
|
|
|
| @@ -38,7 +42,15 @@ class NativeDesktopMediaList : public DesktopMediaListBase {
|
| // OnSourceThumbnail() for each changed thumbnail and then calls
|
| // DelayLaunchNextRefersh() at the end.
|
| void Refresh() override;
|
| - void OnSourceThumbnail(int index, const gfx::ImageSkia& image);
|
| +
|
| + void OnSourceThumbnailCaptured(int index, const gfx::ImageSkia& image);
|
| + void FinishRefreshOnUiThreadAndScheduleNext(
|
| + std::vector<DesktopMediaID> aura_ids);
|
| + void OnAuraThumbnailCaptured(DesktopMediaID id, const gfx::Image& image);
|
| +#if defined(USE_AURA)
|
| + NativeAuraIdMap GetBrowserNativeAuraIdMap();
|
| + void CaptureAuraWindowThumbnail(DesktopMediaID id);
|
| +#endif
|
|
|
| // Task runner used for the |worker_|.
|
| scoped_refptr<base::SequencedTaskRunner> capture_task_runner_;
|
| @@ -48,6 +60,15 @@ class NativeDesktopMediaList : public DesktopMediaListBase {
|
| // after the model is destroyed.
|
| scoped_ptr<Worker> worker_;
|
|
|
| + int total_aura_windows_;
|
| + int processed_aura_window_count_;
|
| + // previous_aura_thumbnail_hashes_ holds thumbanil hash values of aura windows
|
| + // in the previous refresh. While new_aura_thumbnail_hashes_ has hash values
|
| + // of the ongoing refresh. Those two maps are used to detect new thumbnails
|
| + // and changed thumbnails from the previous refresh.
|
| + ImageHashesMap previous_aura_thumbnail_hashes_;
|
| + ImageHashesMap new_aura_thumbnail_hashes_;
|
| +
|
| base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaList);
|
|
|