OLD | NEW |
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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // We need to reset these flags when we want to repaint the contents of | 470 // We need to reset these flags when we want to repaint the contents of |
471 // browser plugin in this RWH. Resetting these flags will ensure we ignore | 471 // browser plugin in this RWH. Resetting these flags will ensure we ignore |
472 // any previous pending acks that are not relevant upon repaint. | 472 // any previous pending acks that are not relevant upon repaint. |
473 void ResetSizeAndRepaintPendingFlags(); | 473 void ResetSizeAndRepaintPendingFlags(); |
474 | 474 |
475 void DetachDelegate(); | 475 void DetachDelegate(); |
476 | 476 |
477 // Update the renderer's cache of the screen rect of the view and window. | 477 // Update the renderer's cache of the screen rect of the view and window. |
478 void SendScreenRects(); | 478 void SendScreenRects(); |
479 | 479 |
480 // Called by the view in response to a flush request. | 480 void OnBeginFrame(); |
481 void FlushInput(); | |
482 | |
483 // Request a flush signal from the view. | |
484 void SetNeedsFlush(); | |
485 | 481 |
486 // Indicates whether the renderer drives the RenderWidgetHosts's size or the | 482 // Indicates whether the renderer drives the RenderWidgetHosts's size or the |
487 // other way around. | 483 // other way around. |
488 bool auto_resize_enabled() { return auto_resize_enabled_; } | 484 bool auto_resize_enabled() { return auto_resize_enabled_; } |
489 | 485 |
490 // The minimum size of this renderer when auto-resize is enabled. | 486 // The minimum size of this renderer when auto-resize is enabled. |
491 const gfx::Size& min_size_for_auto_resize() const { | 487 const gfx::Size& min_size_for_auto_resize() const { |
492 return min_size_for_auto_resize_; | 488 return min_size_for_auto_resize_; |
493 } | 489 } |
494 | 490 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 // content but failed to produce a compositor frame in a defined time. | 630 // content but failed to produce a compositor frame in a defined time. |
635 void ClearDisplayedGraphics(); | 631 void ClearDisplayedGraphics(); |
636 | 632 |
637 // Called if we know the renderer is responsive. When we currently think the | 633 // Called if we know the renderer is responsive. When we currently think the |
638 // renderer is unresponsive, this will clear that state and call | 634 // renderer is unresponsive, this will clear that state and call |
639 // NotifyRendererResponsive. | 635 // NotifyRendererResponsive. |
640 void RendererIsResponsive(); | 636 void RendererIsResponsive(); |
641 | 637 |
642 void OnGpuSwapBuffersCompletedInternal(const ui::LatencyInfo& latency_info); | 638 void OnGpuSwapBuffersCompletedInternal(const ui::LatencyInfo& latency_info); |
643 | 639 |
| 640 void RequestBeginFrameForSynthesizedInput( |
| 641 base::OnceClosure begin_frame_callback); |
| 642 |
644 // IPC message handlers | 643 // IPC message handlers |
645 void OnRenderProcessGone(int status, int error_code); | 644 void OnRenderProcessGone(int status, int error_code); |
646 void OnClose(); | 645 void OnClose(); |
647 void OnUpdateScreenRectsAck(); | 646 void OnUpdateScreenRectsAck(); |
648 void OnRequestMove(const gfx::Rect& pos); | 647 void OnRequestMove(const gfx::Rect& pos); |
649 void OnSetTooltipText(const base::string16& tooltip_text, | 648 void OnSetTooltipText(const base::string16& tooltip_text, |
650 blink::WebTextDirection text_direction_hint); | 649 blink::WebTextDirection text_direction_hint); |
651 void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack); | 650 void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack); |
652 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 651 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
653 void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet); | 652 void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet); |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 cc::CompositorFrameMetadata last_frame_metadata_; | 975 cc::CompositorFrameMetadata last_frame_metadata_; |
977 | 976 |
978 // Last non-zero frame token received from the renderer. Any swap messsages | 977 // Last non-zero frame token received from the renderer. Any swap messsages |
979 // having a token less than or equal to this value will be processed. | 978 // having a token less than or equal to this value will be processed. |
980 uint32_t last_received_frame_token_ = 0; | 979 uint32_t last_received_frame_token_ = 0; |
981 | 980 |
982 // List of all swap messages that their corresponding frames have not arrived. | 981 // List of all swap messages that their corresponding frames have not arrived. |
983 // Sorted by frame token. | 982 // Sorted by frame token. |
984 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_; | 983 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_; |
985 | 984 |
| 985 base::OnceClosure begin_frame_callback_; |
| 986 |
986 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 987 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
987 | 988 |
988 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 989 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
989 }; | 990 }; |
990 | 991 |
991 } // namespace content | 992 } // namespace content |
992 | 993 |
993 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 994 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |