12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
- From: Shelley Vohr <[email protected]>
- Date: Fri, 9 Apr 2021 19:30:01 +0200
- Subject: fix: expose DecrementCapturerCount in web_contents_impl
- This was made private in https://chromium-review.googlesource.com/c/chromium/src/+/2807829 but
- we invoke it in order to expose contents.decrementCapturerCount([stayHidden, stayAwake])
- to users. We should try to upstream this.
- diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
- index 43b6f3bb996a296f6f6619eff60c84c2a1dc0da5..847403381e87d2bba3af254610347f4bf96b3c56 100644
- --- a/content/browser/web_contents/web_contents_impl.h
- +++ b/content/browser/web_contents/web_contents_impl.h
- @@ -394,6 +394,9 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
- const gfx::Size& capture_size,
- bool stay_hidden,
- bool stay_awake) override WARN_UNUSED_RESULT;
- + // Called when the base::ScopedClosureRunner returned by
- + // IncrementCapturerCount() is destructed.
- + void DecrementCapturerCount(bool stay_hidden, bool stay_awake) override;
- bool IsBeingCaptured() override;
- bool IsBeingVisiblyCaptured() override;
- bool IsAudioMuted() override;
- @@ -1707,10 +1710,6 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
- // shown in the address bar), as opposed to one in for example a Prerender.
- bool IsPrimaryFrameTree(const FrameTree& frame_tree) const;
-
- - // Called when the base::ScopedClosureRunner returned by
- - // IncrementCapturerCount() is destructed.
- - void DecrementCapturerCount(bool stay_hidden, bool stay_awake);
- -
- // Data for core operation ---------------------------------------------------
-
- // Delegate for notifying our owner about stuff. Not owned by us.
- diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
- index 9d089057f886c7b6b10ded3c2b37f5580f3b67f7..517d5e18e064f23aebd3eed0e6c0a5e41a32c863 100644
- --- a/content/public/browser/web_contents.h
- +++ b/content/public/browser/web_contents.h
- @@ -570,6 +570,7 @@ class WebContents : public PageNavigator,
- const gfx::Size& capture_size,
- bool stay_hidden,
- bool stay_awake) WARN_UNUSED_RESULT = 0;
- + virtual void DecrementCapturerCount(bool stay_hidden, bool stay_awake) = 0;
-
- // Returns true if audio/screenshot/video is being captured by the embedder,
- // as indicated by calls to IncrementCapturerCount().
|