Picture-in-Picture close button click decrements keep alive count.
This makes sure extension internal keep_alive_count counter decrement
when user clicks "Close" button on the Picture-in-Picture window.
Bug: 878743
Change-Id: I4a82ba3e0fa3c3de7241e73352ced30e14c59ca1
Reviewed-on: https://chromium-review.googlesource.com/1193877
Reviewed-by: Bo <[email protected]>
Commit-Queue: François Beaufort <[email protected]>
Cr-Commit-Position: refs/heads/master@{#587591}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9de90ee..36dab1bd 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1496,6 +1496,8 @@
return;
has_picture_in_picture_video_ = has_picture_in_picture_video;
NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB);
+ for (auto& observer : observers_)
+ observer.MediaPictureInPictureChanged(has_picture_in_picture_video_);
}
bool WebContentsImpl::IsCrashed() const {
@@ -6503,11 +6505,6 @@
observer.MediaEffectivelyFullscreenChanged(is_fullscreen);
}
-void WebContentsImpl::MediaPictureInPictureChanged(bool is_picture_in_picture) {
- for (auto& observer : observers_)
- observer.MediaPictureInPictureChanged(is_picture_in_picture);
-}
-
base::Optional<gfx::Size> WebContentsImpl::GetFullscreenVideoSize() {
base::Optional<WebContentsObserver::MediaPlayerId> id =
media_web_contents_observer_->GetFullscreenVideoMediaPlayerId();