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

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

Issue 1763753003: Capture chrome browser windows from internal rendering procedure for 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 f3635e55f5088238412f59396ed265c83fd21097..9eec7bc9eece6ce703343b43c4da0c90da2f7e34 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,10 @@ 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 OnAuraThumbnailCaptured(DesktopMediaID id,
+ int total_aura_windows,
+ const gfx::Image& image);
// Task runner used for the |worker_|.
scoped_refptr<base::SequencedTaskRunner> capture_task_runner_;
@@ -48,6 +55,15 @@ class NativeDesktopMediaList : public DesktopMediaListBase {
// after the model is destroyed.
scoped_ptr<Worker> worker_;
+ int processed_aura_window_count_;
+ ImageHashesMap aura_thumbnail_hashes_;
+ ImageHashesMap cur_aura_thumbnail_hashes_;
Sergey Ulanov 2016/03/07 21:01:50 call this new_aura_thumbnail_hashes_? Also add com
GeorgeZ 2016/03/09 22:38:52 Done.
+
+#if defined(USE_AURA)
+ NativeAuraIdMap GetBrowserNativeAuraIdMap();
+ void CaptureAuraWindowThumbnail(DesktopMediaID id, int total_aura_windows);
+#endif
+
base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaList);

Powered by Google App Engine
This is Rietveld 408576698