Commit a66b44d6 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Remove FullscreenIsGranted API from WebFrameWidget.

Checking that the fullscreen element is non-null implicitly means that
fullscreen has already been granted.

Verified via:
out/Release/chrome --register-pepper-plugins="out/Release/libppapi_example_mouse_lock.so;application/x-ppapi-example-mouse-lock"

BUG=1097816

Change-Id: I125da5db68346f5cc90279110ce676c70cf27c0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488124
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819148}
parent e052cda2
...@@ -1247,9 +1247,6 @@ void PepperPluginInstanceImpl::ViewChanged( ...@@ -1247,9 +1247,6 @@ void PepperPluginInstanceImpl::ViewChanged(
if (desired_fullscreen_state_ || view_data_.is_fullscreen) { if (desired_fullscreen_state_ || view_data_.is_fullscreen) {
bool is_fullscreen_element = container_->IsFullscreenElement(); bool is_fullscreen_element = container_->IsFullscreenElement();
if (!view_data_.is_fullscreen && desired_fullscreen_state_ && if (!view_data_.is_fullscreen && desired_fullscreen_state_ &&
render_frame()
->GetLocalRootRenderWidget()
->IsFullscreenGrantedForFrame() &&
is_fullscreen_element) { is_fullscreen_element) {
// Entered fullscreen. Only possible via SetFullscreen(). // Entered fullscreen. Only possible via SetFullscreen().
view_data_.is_fullscreen = true; view_data_.is_fullscreen = true;
......
...@@ -478,10 +478,4 @@ void RenderWidget::DidNavigate(ukm::SourceId source_id, const GURL& url) { ...@@ -478,10 +478,4 @@ void RenderWidget::DidNavigate(ukm::SourceId source_id, const GURL& url) {
} }
} }
bool RenderWidget::IsFullscreenGrantedForFrame() {
if (!for_frame())
return false;
return GetFrameWidget()->IsFullscreenGranted();
}
} // namespace content } // namespace content
...@@ -221,9 +221,6 @@ class CONTENT_EXPORT RenderWidget ...@@ -221,9 +221,6 @@ class CONTENT_EXPORT RenderWidget
base::OnceCallback<void(const gfx::PresentationFeedback&)>; base::OnceCallback<void(const gfx::PresentationFeedback&)>;
virtual void RequestPresentation(PresentationTimeCallback callback); virtual void RequestPresentation(PresentationTimeCallback callback);
// Determines if fullscreen is granted for the frame.
bool IsFullscreenGrantedForFrame();
protected: protected:
// Destroy the RenderWidget. The |widget| is the owning pointer of |this|. // Destroy the RenderWidget. The |widget| is the owning pointer of |this|.
virtual void Close(std::unique_ptr<RenderWidget> widget); virtual void Close(std::unique_ptr<RenderWidget> widget);
......
...@@ -184,9 +184,6 @@ class WebFrameWidget : public WebWidget { ...@@ -184,9 +184,6 @@ class WebFrameWidget : public WebWidget {
// If the widget is currently selecting a range. // If the widget is currently selecting a range.
virtual bool HandlingSelectRange() = 0; virtual bool HandlingSelectRange() = 0;
// If fullscreen has been granted.
virtual bool IsFullscreenGranted() = 0;
// Returns true if a pinch gesture is currently active in main frame. // Returns true if a pinch gesture is currently active in main frame.
virtual bool PinchGestureActiveInMainFrame() = 0; virtual bool PinchGestureActiveInMainFrame() = 0;
......
...@@ -322,7 +322,6 @@ class CORE_EXPORT WebFrameWidgetBase ...@@ -322,7 +322,6 @@ class CORE_EXPORT WebFrameWidgetBase
void CancelCompositionForPepper() override; void CancelCompositionForPepper() override;
void ApplyVisualProperties( void ApplyVisualProperties(
const VisualProperties& visual_properties) override; const VisualProperties& visual_properties) override;
bool IsFullscreenGranted() override;
bool PinchGestureActiveInMainFrame() override; bool PinchGestureActiveInMainFrame() override;
float PageScaleInMainFrame() override; float PageScaleInMainFrame() override;
const ScreenInfo& GetScreenInfo() override; const ScreenInfo& GetScreenInfo() override;
...@@ -616,6 +615,9 @@ class CORE_EXPORT WebFrameWidgetBase ...@@ -616,6 +615,9 @@ class CORE_EXPORT WebFrameWidgetBase
void PointerLockMouseEvent(const WebCoalescedInputEvent&); void PointerLockMouseEvent(const WebCoalescedInputEvent&);
bool IsPointerLocked(); bool IsPointerLocked();
// The fullscreen granted status from the most recent VisualProperties update.
bool IsFullscreenGranted();
virtual PageWidgetEventHandler* GetPageWidgetEventHandler() = 0; virtual PageWidgetEventHandler* GetPageWidgetEventHandler() = 0;
// Return the LocalFrameView used for animation scrolling. This is overridden // Return the LocalFrameView used for animation scrolling. This is overridden
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment