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

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

Issue 2789773003: Send FrameSwapMessageQueue's messages with a separate IPC (Closed)
Patch Set: rebased Created 3 years, 8 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_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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 const ViewHostMsg_SelectionBounds_Params& params); 654 const ViewHostMsg_SelectionBounds_Params& params);
655 void OnSetNeedsBeginFrames(bool needs_begin_frames); 655 void OnSetNeedsBeginFrames(bool needs_begin_frames);
656 void OnHittestData(const FrameHostMsg_HittestData_Params& params); 656 void OnHittestData(const FrameHostMsg_HittestData_Params& params);
657 void OnFocusedNodeTouched(bool editable); 657 void OnFocusedNodeTouched(bool editable);
658 void OnStartDragging(const DropData& drop_data, 658 void OnStartDragging(const DropData& drop_data,
659 blink::WebDragOperationsMask operations_allowed, 659 blink::WebDragOperationsMask operations_allowed,
660 const SkBitmap& bitmap, 660 const SkBitmap& bitmap,
661 const gfx::Vector2d& bitmap_offset_in_dip, 661 const gfx::Vector2d& bitmap_offset_in_dip,
662 const DragEventSourceInfo& event_info); 662 const DragEventSourceInfo& event_info);
663 void OnUpdateDragCursor(blink::WebDragOperation current_op); 663 void OnUpdateDragCursor(blink::WebDragOperation current_op);
664 void OnFrameSwapMessagesReceived(uint32_t frame_id,
665 std::vector<IPC::Message> messages);
664 666
665 // Called (either immediately or asynchronously) after we're done with our 667 // Called (either immediately or asynchronously) after we're done with our
666 // BackingStore and can send an ACK to the renderer so it can paint onto it 668 // BackingStore and can send an ACK to the renderer so it can paint onto it
667 // again. 669 // again.
668 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params, 670 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params,
669 const base::TimeTicks& paint_start); 671 const base::TimeTicks& paint_start);
670 672
671 // Give key press listeners a chance to handle this key press. This allow 673 // Give key press listeners a chance to handle this key press. This allow
672 // widgets that don't have focus to still handle key presses. 674 // widgets that don't have focus to still handle key presses.
673 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event); 675 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 void StartHangMonitorTimeout(base::TimeDelta delay, 730 void StartHangMonitorTimeout(base::TimeDelta delay,
729 blink::WebInputEvent::Type event_type); 731 blink::WebInputEvent::Type event_type);
730 732
731 // Stops all existing hang monitor timeouts and assumes the renderer is 733 // Stops all existing hang monitor timeouts and assumes the renderer is
732 // responsive. 734 // responsive.
733 void StopHangMonitorTimeout(); 735 void StopHangMonitorTimeout();
734 736
735 // Used for UMA logging how long the renderer was unresponsive. 737 // Used for UMA logging how long the renderer was unresponsive.
736 void LogHangMonitorUnresponsive(); 738 void LogHangMonitorUnresponsive();
737 739
740 void ProcessSwapMessages(std::vector<IPC::Message> messages);
741 void DidProcessFrame(uint32_t frame_id);
742
738 // true if a renderer has once been valid. We use this flag to display a sad 743 // true if a renderer has once been valid. We use this flag to display a sad
739 // tab only when we lose our renderer and not if a paint occurs during 744 // tab only when we lose our renderer and not if a paint occurs during
740 // initialization. 745 // initialization.
741 bool renderer_initialized_; 746 bool renderer_initialized_;
742 747
743 // True if |Destroy()| has been called. 748 // True if |Destroy()| has been called.
744 bool destroyed_; 749 bool destroyed_;
745 750
746 // Our delegate, which wants to know mainly about keyboard events. 751 // Our delegate, which wants to know mainly about keyboard events.
747 // It will remain non-NULL until DetachDelegate() is called. 752 // It will remain non-NULL until DetachDelegate() is called.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 // factor change, a new LocalSurfaceId must be created. 945 // factor change, a new LocalSurfaceId must be created.
941 cc::LocalSurfaceId last_local_surface_id_; 946 cc::LocalSurfaceId last_local_surface_id_;
942 gfx::Size last_frame_size_; 947 gfx::Size last_frame_size_;
943 float last_device_scale_factor_; 948 float last_device_scale_factor_;
944 949
945 // Each instance of RendererCompositorFrameSink has an ID that we keep track 950 // Each instance of RendererCompositorFrameSink has an ID that we keep track
946 // of so we can tell when a new instance has been created for the purpose of 951 // of so we can tell when a new instance has been created for the purpose of
947 // not returning stale resources. 952 // not returning stale resources.
948 uint32_t last_compositor_frame_sink_id_ = 0; 953 uint32_t last_compositor_frame_sink_id_ = 0;
949 954
955 // List of the tokens of all frames that their messages have not arrived.
956 // Tokens are in ascending order.
957 std::deque<uint32_t> queued_tokens_;
958
959 // List of all swap messages that their corresponding frames have not arrived.
960 // Sorted by frame token.
961 std::deque<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_;
962
950 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 963 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
951 964
952 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 965 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
953 }; 966 };
954 967
955 } // namespace content 968 } // namespace content
956 969
957 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 970 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698