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

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

Issue 10823077: Throttle SelectRange IPC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renamed next_select_range, handled RendererExited Created 8 years, 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); 498 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size);
499 void OnCompositorSurfaceBuffersSwapped(int32 surface_id, 499 void OnCompositorSurfaceBuffersSwapped(int32 surface_id,
500 uint64 surface_handle, 500 uint64 surface_handle,
501 int32 route_id, 501 int32 route_id,
502 int32 gpu_process_host_id); 502 int32 gpu_process_host_id);
503 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); 503 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
504 void OnMsgUpdateIsDelayed(); 504 void OnMsgUpdateIsDelayed();
505 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type, 505 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type,
506 bool processed); 506 bool processed);
507 void OnMsgBeginSmoothScroll(bool scroll_down, bool scroll_far); 507 void OnMsgBeginSmoothScroll(bool scroll_down, bool scroll_far);
508 void OnMsgSelectRangeAck();
508 virtual void OnMsgFocus(); 509 virtual void OnMsgFocus();
509 virtual void OnMsgBlur(); 510 virtual void OnMsgBlur();
510 void OnMsgHasTouchEventHandlers(bool has_handlers); 511 void OnMsgHasTouchEventHandlers(bool has_handlers);
511 512
512 void OnMsgSetCursor(const WebCursor& cursor); 513 void OnMsgSetCursor(const WebCursor& cursor);
513 void OnMsgTextInputStateChanged(ui::TextInputType type, 514 void OnMsgTextInputStateChanged(ui::TextInputType type,
514 bool can_compose_inline); 515 bool can_compose_inline);
515 void OnMsgImeCompositionRangeChanged( 516 void OnMsgImeCompositionRangeChanged(
516 const ui::Range& range, 517 const ui::Range& range,
517 const std::vector<gfx::Rect>& character_bounds); 518 const std::vector<gfx::Rect>& character_bounds);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 675
675 // (Similar to |next_mouse_move_|.) The next mouse wheel events to send. 676 // (Similar to |next_mouse_move_|.) The next mouse wheel events to send.
676 // Unlike mouse moves, mouse wheel events received while one is pending are 677 // Unlike mouse moves, mouse wheel events received while one is pending are
677 // coalesced (by accumulating deltas) if they match the previous event in 678 // coalesced (by accumulating deltas) if they match the previous event in
678 // modifiers. On the Mac, in particular, mouse wheel events are received at a 679 // modifiers. On the Mac, in particular, mouse wheel events are received at a
679 // high rate; not waiting for the ack results in jankiness, and using the same 680 // high rate; not waiting for the ack results in jankiness, and using the same
680 // mechanism as for mouse moves (just dropping old events when multiple ones 681 // mechanism as for mouse moves (just dropping old events when multiple ones
681 // would be queued) results in very slow scrolling. 682 // would be queued) results in very slow scrolling.
682 WheelEventQueue coalesced_mouse_wheel_events_; 683 WheelEventQueue coalesced_mouse_wheel_events_;
683 684
685 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK.
686 bool select_range_pending_;
687
688 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any.
689 struct SelectionRange {
690 gfx::Point start, end;
691 };
692 scoped_ptr<SelectionRange> next_selection_range_;
693
684 // The time when an input event was sent to the RenderWidget. 694 // The time when an input event was sent to the RenderWidget.
685 base::TimeTicks input_event_start_time_; 695 base::TimeTicks input_event_start_time_;
686 696
687 // Keyboard event listeners. 697 // Keyboard event listeners.
688 std::list<KeyboardListener*> keyboard_listeners_; 698 std::list<KeyboardListener*> keyboard_listeners_;
689 699
690 // If true, then we should repaint when restoring even if we have a 700 // If true, then we should repaint when restoring even if we have a
691 // backingstore. This flag is set to true if we receive a paint message 701 // backingstore. This flag is set to true if we receive a paint message
692 // while is_hidden_ to true. Even though we tell the render widget to hide 702 // while is_hidden_ to true. Even though we tell the render widget to hide
693 // itself, a paint message could already be in flight at that point. 703 // itself, a paint message could already be in flight at that point.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 scoped_ptr<SmoothScrollGesture> active_smooth_scroll_gesture_; 783 scoped_ptr<SmoothScrollGesture> active_smooth_scroll_gesture_;
774 784
775 scoped_ptr<GestureEventFilter> gesture_event_filter_; 785 scoped_ptr<GestureEventFilter> gesture_event_filter_;
776 786
777 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 787 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
778 }; 788 };
779 789
780 } // namespace content 790 } // namespace content
781 791
782 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 792 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698