Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Refer to static layer as thumbnail layer within content. Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 231 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
232 232
233 // cc::BeginFrameObserver implementation. 233 // cc::BeginFrameObserver implementation.
234 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 234 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
235 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override; 235 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override;
236 void OnBeginFrameSourcePausedChanged(bool paused) override; 236 void OnBeginFrameSourcePausedChanged(bool paused) override;
237 237
238 // Non-virtual methods 238 // Non-virtual methods
239 void SetContentViewCore(ContentViewCoreImpl* content_view_core); 239 void SetContentViewCore(ContentViewCoreImpl* content_view_core);
240 SkColor GetCachedBackgroundColor() const; 240 SkColor GetCachedBackgroundColor() const;
241 bool can_show_thumbnail_placeholder() const {
Khushal 2017/06/14 19:43:14 nit: not a trivial accessor. CanShowThumbnailPlace
steimel 2017/06/14 21:46:16 Done.
242 return !(fullscreen_state_ == FullscreenState::kEnteringFullscreen ||
243 fullscreen_state_ == FullscreenState::kExitingFullscreen ||
244 fullscreen_state_ == FullscreenState::kFullscreenRotation);
245 }
241 void SendKeyEvent(const NativeWebKeyboardEvent& event); 246 void SendKeyEvent(const NativeWebKeyboardEvent& event);
242 void SendMouseEvent(const ui::MotionEventAndroid&, int action_button); 247 void SendMouseEvent(const ui::MotionEventAndroid&, int action_button);
243 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); 248 void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
244 void SendGestureEvent(const blink::WebGestureEvent& event); 249 void SendGestureEvent(const blink::WebGestureEvent& event);
245 void ResolveTapDisambiguation(double timestamp_seconds, 250 void ResolveTapDisambiguation(double timestamp_seconds,
246 gfx::Point tap_viewport_offset, 251 gfx::Point tap_viewport_offset,
247 bool is_long_press); 252 bool is_long_press);
248 void set_ime_adapter(ImeAdapterAndroid* ime_adapter) { 253 void set_ime_adapter(ImeAdapterAndroid* ime_adapter) {
249 ime_adapter_android_ = ime_adapter; 254 ime_adapter_android_ = ime_adapter;
250 } 255 }
251 void set_selection_popup_controller(SelectionPopupController* controller) { 256 void set_selection_popup_controller(SelectionPopupController* controller) {
252 selection_popup_controller_ = controller; 257 selection_popup_controller_ = controller;
253 } 258 }
254 259
255 base::WeakPtr<RenderWidgetHostViewAndroid> GetWeakPtrAndroid(); 260 base::WeakPtr<RenderWidgetHostViewAndroid> GetWeakPtrAndroid();
256 261
257 bool OnTouchEvent(const ui::MotionEvent& event); 262 bool OnTouchEvent(const ui::MotionEvent& event);
258 bool OnTouchHandleEvent(const ui::MotionEvent& event); 263 bool OnTouchHandleEvent(const ui::MotionEvent& event);
259 int GetTouchHandleHeight(); 264 int GetTouchHandleHeight();
260 void ResetGestureDetection(); 265 void ResetGestureDetection();
261 void SetDoubleTapSupportEnabled(bool enabled); 266 void SetDoubleTapSupportEnabled(bool enabled);
262 void SetMultiTouchZoomSupportEnabled(bool enabled); 267 void SetMultiTouchZoomSupportEnabled(bool enabled);
263 268
264 void WasResized(); 269 void WasResized();
265 270
271 void OnFullscreenStateChanged(bool entered_fullscreen);
272
266 bool HasValidFrame() const; 273 bool HasValidFrame() const;
267 274
268 void MoveCaret(const gfx::Point& point); 275 void MoveCaret(const gfx::Point& point);
269 void ShowContextMenuAtPoint(const gfx::Point& point, ui::MenuSourceType); 276 void ShowContextMenuAtPoint(const gfx::Point& point, ui::MenuSourceType);
270 void DismissTextHandles(); 277 void DismissTextHandles();
271 void SetTextHandlesTemporarilyHidden(bool hidden); 278 void SetTextHandlesTemporarilyHidden(bool hidden);
272 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); 279 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip);
273 void OnSelectWordAroundCaretAck(bool did_select, 280 void OnSelectWordAroundCaretAck(bool did_select,
274 int start_adjust, 281 int start_adjust,
275 int end_adjust); 282 int end_adjust);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 void RequestDisallowInterceptTouchEvent(); 349 void RequestDisallowInterceptTouchEvent();
343 350
344 bool SyncCompositorOnMessageReceived(const IPC::Message& message); 351 bool SyncCompositorOnMessageReceived(const IPC::Message& message);
345 352
346 void ComputeEventLatencyOSTouchHistograms(const ui::MotionEvent& event); 353 void ComputeEventLatencyOSTouchHistograms(const ui::MotionEvent& event);
347 354
348 void CreateOverscrollControllerIfPossible(); 355 void CreateOverscrollControllerIfPossible();
349 356
350 WebContentsAccessibilityAndroid* GetWebContentsAccessibilityAndroid() const; 357 WebContentsAccessibilityAndroid* GetWebContentsAccessibilityAndroid() const;
351 358
359 void EvictFrameIfNecessary(bool physical_backing_resized);
360 enum class FullscreenState {
Khushal 2017/06/14 19:43:14 nit: Generally this would be at the beginning of t
steimel 2017/06/14 21:46:16 Done.
361 kNotFullscreen,
362 kEnteringFullscreen,
363 kFullscreen,
364 kExitingFullscreen,
365 kFullscreenRotation,
366 };
367
352 // The model object. 368 // The model object.
353 RenderWidgetHostImpl* host_; 369 RenderWidgetHostImpl* host_;
354 370
355 // The begin frame source being observed. Null if none. 371 // The begin frame source being observed. Null if none.
356 cc::BeginFrameSource* begin_frame_source_; 372 cc::BeginFrameSource* begin_frame_source_;
357 cc::BeginFrameArgs last_begin_frame_args_; 373 cc::BeginFrameArgs last_begin_frame_args_;
358 uint32_t latest_confirmed_begin_frame_source_id_; 374 uint32_t latest_confirmed_begin_frame_source_id_;
359 uint64_t latest_confirmed_begin_frame_sequence_number_; 375 uint64_t latest_confirmed_begin_frame_sequence_number_;
360 376
361 // Indicates whether and for what reason a request for begin frames has been 377 // Indicates whether and for what reason a request for begin frames has been
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 std::unique_ptr<viz::FrameEvictor> frame_evictor_; 437 std::unique_ptr<viz::FrameEvictor> frame_evictor_;
422 438
423 bool observing_root_window_; 439 bool observing_root_window_;
424 440
425 // The last scroll offset of the view. 441 // The last scroll offset of the view.
426 gfx::Vector2dF last_scroll_offset_; 442 gfx::Vector2dF last_scroll_offset_;
427 443
428 float prev_top_shown_pix_; 444 float prev_top_shown_pix_;
429 float prev_bottom_shown_pix_; 445 float prev_bottom_shown_pix_;
430 446
447 FullscreenState fullscreen_state_ = FullscreenState::kNotFullscreen;
448 bool awaiting_resize_ = false;
Khushal 2017/06/14 19:43:14 nit: fullscreen_transition_awaiting_resize_? And
steimel 2017/06/14 21:46:16 Done.
449 bool current_frame_is_fullscreen_ = false;
450 bool web_contents_is_fullscreen_ = false;
451
431 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ = 452 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ =
432 nullptr; 453 nullptr;
433 454
434 base::ObserverList<DestructionObserver> destruction_observers_; 455 base::ObserverList<DestructionObserver> destruction_observers_;
435 456
436 MouseWheelPhaseHandler mouse_wheel_phase_handler_; 457 MouseWheelPhaseHandler mouse_wheel_phase_handler_;
437 458
438 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 459 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
439 460
440 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 461 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
441 }; 462 };
442 463
443 } // namespace content 464 } // namespace content
444 465
445 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 466 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698