73e33bc876
* chore: bump chromium in DEPS to 119.0.5994.0 * chore: update patches * Add some more debugging for navigation origin & process lock mismatch https://chromium-review.googlesource.com/c/chromium/src/+/4829483 * chore: bump chromium in DEPS to 119.0.5996.2 * chore: bump chromium in DEPS to 119.0.5997.0 * chore: bump chromium in DEPS to 119.0.6000.0 * chore: bump chromium in DEPS to 119.0.6002.0 * 4781766: Port remaining control color ids to the color pipeline https://chromium-review.googlesource.com/c/chromium/src/+/4781766 * 4846057: Preloading: Move prefetch_prefs to chrome/browser/preloading/ https://chromium-review.googlesource.com/c/chromium/src/+/4846057 * chore: fixup patch indices * 4848108: Pass v8::Isolate into FromV8Value calls on blink API https://chromium-review.googlesource.com/c/chromium/src/+/4848108 * 4834471: Reland "[api] allow v8::Data as internal field" https://chromium-review.googlesource.com/c/v8/v8/+/4834471 * 4808884: Major overhaul of ExceptionState in the v8 bindings https://chromium-review.googlesource.com/c/chromium/src/+/4808884 * 4791643: [sandbox] Add a TRUSTED_SPACE and TRUSTED_LO_SPACE to the V8 heap https://chromium-review.googlesource.com/c/v8/v8/+/4791643 * chore: bump chromium in DEPS to 119.0.6005.0 * 4776268: [v8][etw] Enables filtering of ETW tracing by URL https://chromium-review.googlesource.com/c/chromium/src/+/4776268 * chore: fixup patch indices * 4673258: WebSQL: Disable WebSQL by default https://chromium-review.googlesource.com/c/chromium/src/+/4673258 * chore: bump chromium in DEPS to 119.0.6006.0 * chore: update patches * 4854732: Reland^2 "[iterator-helpers] Unship due to incompat" https://chromium-review.googlesource.com/c/v8/v8/+/4854732 * 4794133: [AWC] Add `display-state` CSS @media feature https://chromium-review.googlesource.com/c/chromium/src/+/4794133 * fixup! Add some more debugging for navigation origin & process lock mismatch * Revert "fixup! Add some more debugging for navigation origin & process lock mismatch" This reverts commit 38fef075fc5690f7db6d4bbcabbe877a1618a964. * 4858437: Revert "[iOS] Delete GN flags for mach absolute time ticks" https://chromium-review.googlesource.com/c/chromium/src/+/4858437 * refactor: fix_crash_loading_non-standard_schemes_in_iframes.patch (#39879) * chore: 4869108: handle absolute and relative gn imports in autoninja https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4869108 * chore: set GOMA_DIR for autoninja * Revert "chore: 4869108: handle absolute and relative gn imports in autoninja" This reverts commit d94c7720bab96d1de25499383948da2cb8862d90. --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Robo <hop2deep@gmail.com>
130 lines
6.4 KiB
Diff
130 lines
6.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: deepak1556 <hop2deep@gmail.com>
|
|
Date: Thu, 18 Oct 2018 17:07:01 -0700
|
|
Subject: desktop_media_list.patch
|
|
|
|
* Use our grit resources instead of the chrome ones.
|
|
* Disabled WindowCaptureMacV2 feature for https://github.com/electron/electron/pull/30507
|
|
* Ensure "OnRefreshComplete()" even if there are no items in the list
|
|
|
|
diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h
|
|
index 42da00a0f473928263df89f11d80830b6986292b..6a556939d0acfbd910ebb0923e198e2fe67fd43d 100644
|
|
--- a/chrome/browser/media/webrtc/desktop_media_list.h
|
|
+++ b/chrome/browser/media/webrtc/desktop_media_list.h
|
|
@@ -107,7 +107,8 @@ class DesktopMediaList {
|
|
// once per DesktopMediaList instance. It should not be called after
|
|
// StartUpdating(), and StartUpdating() should not be called until |callback|
|
|
// has been called.
|
|
- virtual void Update(UpdateCallback callback) = 0;
|
|
+ virtual void Update(UpdateCallback callback,
|
|
+ bool refresh_thumbnails = false) = 0;
|
|
|
|
virtual int GetSourceCount() const = 0;
|
|
virtual const Source& GetSource(int index) const = 0;
|
|
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
|
|
index 489e6f7b7b0bb52b938a4fc137b983f3330cd4d2..1f2754dae9b81a7d233539a7e4e6ac77b3c5941f 100644
|
|
--- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
|
|
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
|
|
@@ -69,12 +69,12 @@ void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) {
|
|
Refresh(true);
|
|
}
|
|
|
|
-void DesktopMediaListBase::Update(UpdateCallback callback) {
|
|
+void DesktopMediaListBase::Update(UpdateCallback callback, bool refresh_thumbnails) {
|
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
DCHECK(sources_.empty());
|
|
DCHECK(!refresh_callback_);
|
|
refresh_callback_ = std::move(callback);
|
|
- Refresh(false);
|
|
+ Refresh(refresh_thumbnails);
|
|
}
|
|
|
|
int DesktopMediaListBase::GetSourceCount() const {
|
|
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
|
index 2cd1000b90fb5af464f81ac25b63092b638c6d40..8f18adb5641b3fa5f9defd3490e20a5d86b672e9 100644
|
|
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
|
|
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
|
@@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList {
|
|
void SetThumbnailSize(const gfx::Size& thumbnail_size) override;
|
|
void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override;
|
|
void StartUpdating(DesktopMediaListObserver* observer) override;
|
|
- void Update(UpdateCallback callback) override;
|
|
+ void Update(UpdateCallback callback, bool refresh_thumbnails) override;
|
|
int GetSourceCount() const override;
|
|
const Source& GetSource(int index) const override;
|
|
DesktopMediaList::Type GetMediaListType() const override;
|
|
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.cc b/chrome/browser/media/webrtc/fake_desktop_media_list.cc
|
|
index 832e0da5271d6ac92466c84dba6917041f825f96..068e7f57be13a89889047abeddd07dfc03b1fce0 100644
|
|
--- a/chrome/browser/media/webrtc/fake_desktop_media_list.cc
|
|
+++ b/chrome/browser/media/webrtc/fake_desktop_media_list.cc
|
|
@@ -79,7 +79,8 @@ void FakeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) {
|
|
thumbnail_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
|
|
}
|
|
|
|
-void FakeDesktopMediaList::Update(UpdateCallback callback) {
|
|
+void FakeDesktopMediaList::Update(UpdateCallback callback,
|
|
+ bool refresh_thumbnails) {
|
|
std::move(callback).Run();
|
|
}
|
|
|
|
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.h b/chrome/browser/media/webrtc/fake_desktop_media_list.h
|
|
index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb6e25e0e4 100644
|
|
--- a/chrome/browser/media/webrtc/fake_desktop_media_list.h
|
|
+++ b/chrome/browser/media/webrtc/fake_desktop_media_list.h
|
|
@@ -40,7 +40,8 @@ class FakeDesktopMediaList : public DesktopMediaList {
|
|
void SetThumbnailSize(const gfx::Size& thumbnail_size) override;
|
|
void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override;
|
|
void StartUpdating(DesktopMediaListObserver* observer) override;
|
|
- void Update(UpdateCallback callback) override;
|
|
+ void Update(UpdateCallback callback,
|
|
+ bool refresh_thumbnails = false) override;
|
|
int GetSourceCount() const override;
|
|
const Source& GetSource(int index) const override;
|
|
DesktopMediaList::Type GetMediaListType() const override;
|
|
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
|
index c2c7d86ed1f089ca6abbb026b4cf4e2857ef66c1..d65182dbae1447d95230a581943d23ee144d9dbe 100644
|
|
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
|
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
|
@@ -160,7 +160,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
|
|
#if BUILDFLAG(IS_MAC)
|
|
BASE_FEATURE(kWindowCaptureMacV2,
|
|
"WindowCaptureMacV2",
|
|
- base::FEATURE_ENABLED_BY_DEFAULT);
|
|
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
|
#endif
|
|
|
|
} // namespace
|
|
@@ -244,7 +244,7 @@ class NativeDesktopMediaList::Worker
|
|
base::WeakPtr<NativeDesktopMediaList> media_list_;
|
|
|
|
DesktopMediaList::Type type_;
|
|
- const std::unique_ptr<ThumbnailCapturer> capturer_;
|
|
+ std::unique_ptr<ThumbnailCapturer> capturer_;
|
|
const ThumbnailCapturer::FrameDeliveryMethod frame_delivery_method_;
|
|
const bool add_current_process_windows_;
|
|
|
|
@@ -531,6 +531,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
|
FROM_HERE,
|
|
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
|
|
media_list_));
|
|
+
|
|
+ // This call is necessary to release underlying OS screen capture mechanisms.
|
|
+ // Skip if the source list is delegated, as the source list window will be active.
|
|
+ if (!capturer_->GetDelegatedSourceListController()) {
|
|
+ capturer_.reset();
|
|
+ }
|
|
}
|
|
|
|
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
|
@@ -964,6 +970,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
|
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
|
|
base::Unretained(worker_.get()),
|
|
std::move(native_ids), thumbnail_size_));
|
|
+ } else {
|
|
+#if defined(USE_AURA)
|
|
+ pending_native_thumbnail_capture_ = true;
|
|
+#endif
|
|
+ UpdateNativeThumbnailsFinished();
|
|
}
|
|
}
|
|
|