Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_android.h |
| diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h |
| index 6846edce443679b5027edc4a970db758f0052c54..acb080dafb4cdf1e9254946f9590b029bfbc747e 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_android.h |
| +++ b/content/browser/renderer_host/render_widget_host_view_android.h |
| @@ -238,6 +238,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| // Non-virtual methods |
| void SetContentViewCore(ContentViewCoreImpl* content_view_core); |
| SkColor GetCachedBackgroundColor() const; |
| + bool CanShowThumbnailPlaceholder() const; |
| void SendKeyEvent(const NativeWebKeyboardEvent& event); |
| void SendMouseEvent(const ui::MotionEventAndroid&, int action_button); |
| void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); |
| @@ -263,6 +264,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| void WasResized(); |
| + void OnFullscreenStateChanged(bool entered_fullscreen) override; |
|
Khushal
2017/06/15 18:42:55
nit: Put this with the rest of the RWHV overrides.
steimel
2017/06/15 21:46:38
Done.
|
| + |
| bool HasValidFrame() const; |
| void MoveCaret(const gfx::Point& point); |
| @@ -304,6 +307,14 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| cc::SurfaceId SurfaceIdForTesting() const override; |
| private: |
| + enum class FullscreenState { |
| + kNotFullscreen, |
| + kEnteringFullscreen, |
| + kFullscreen, |
| + kExitingFullscreen, |
| + kFullscreenRotation, |
|
mlamouri (slow - plz ping)
2017/06/15 13:23:41
Do we not care about rotation when not in fullscre
Khushal
2017/06/15 18:42:55
In those case we just use the frame we have and us
|
| + }; |
| + |
| void RunAckCallbacks(); |
| void SendReclaimCompositorResources(bool is_swap_ack); |
| @@ -349,6 +360,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| WebContentsAccessibilityAndroid* GetWebContentsAccessibilityAndroid() const; |
| + void UpdateFullscreenState(bool physical_backing_resized); |
| + |
| // The model object. |
| RenderWidgetHostImpl* host_; |
| @@ -428,6 +441,21 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| float prev_top_shown_pix_; |
| float prev_bottom_shown_pix_; |
| + FullscreenState fullscreen_state_ = FullscreenState::kNotFullscreen; |
| + |
| + // While we could simply take a mismatch in fullscreen states as the trigger |
| + // for a transition, and assume the transition to have finished once the |
| + // fullscreen states and sizes match, we have cases where we reach this |
| + // consistent state before the physical backing size changes. Therefore we |
| + // defer assuming the transition to be completed until a resize event is |
| + // received, which is marked by |fullscreen_transition_awaiting_resize_|. |
| + // |
| + // Note that this assumes that every transition will be followed by a change |
| + // in the view's physical backing size. |
| + bool fullscreen_transition_awaiting_resize_ = false; |
| + bool current_frame_is_fullscreen_ = false; |
| + bool web_contents_is_fullscreen_ = false; |
| + |
| cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ = |
| nullptr; |