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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 536059: Mac: Coalesce scroll events. (Closed)
Patch Set: test Created 10 years, 11 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 | chrome/browser/renderer_host/render_widget_host.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "app/gfx/native_widget_types.h" 10 #include "app/gfx/native_widget_types.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 gfx::Size in_flight_size_; 504 gfx::Size in_flight_size_;
505 505
506 // True if a mouse move event was sent to the render view and we are waiting 506 // True if a mouse move event was sent to the render view and we are waiting
507 // for a corresponding ViewHostMsg_HandleInputEvent_ACK message. 507 // for a corresponding ViewHostMsg_HandleInputEvent_ACK message.
508 bool mouse_move_pending_; 508 bool mouse_move_pending_;
509 509
510 // The next mouse move event to send (only non-null while mouse_move_pending_ 510 // The next mouse move event to send (only non-null while mouse_move_pending_
511 // is true). 511 // is true).
512 scoped_ptr<WebKit::WebMouseEvent> next_mouse_move_; 512 scoped_ptr<WebKit::WebMouseEvent> next_mouse_move_;
513 513
514 // (Similar to |mouse_move_pending_|.) True if a mouse wheel event was sent
515 // and we are waiting for a corresponding ack.
516 bool mouse_wheel_pending_;
517
518 typedef std::deque<WebKit::WebMouseWheelEvent> WheelEventQueue;
519
520 // (Similar to |next_mouse_move_|.) The next mouse wheel events to send.
521 // Unlike mouse moves, mouse wheel events received while one is pending are
522 // coalesced (by accumulating deltas) if they match the previous event in
523 // modifiers. On the Mac, in particular, mouse wheel events are received at a
524 // high rate; not waiting for the ack results in jankiness, and using the same
525 // mechanism as for mouse moves (just dropping old events when multiple ones
526 // would be queued) results in very slow scrolling.
527 WheelEventQueue coalesced_mouse_wheel_events_;
528
514 // The time when an input event was sent to the RenderWidget. 529 // The time when an input event was sent to the RenderWidget.
515 base::TimeTicks input_event_start_time_; 530 base::TimeTicks input_event_start_time_;
516 531
517 // If true, then we should repaint when restoring even if we have a 532 // If true, then we should repaint when restoring even if we have a
518 // backingstore. This flag is set to true if we receive a paint message 533 // backingstore. This flag is set to true if we receive a paint message
519 // while is_hidden_ to true. Even though we tell the render widget to hide 534 // while is_hidden_ to true. Even though we tell the render widget to hide
520 // itself, a paint message could already be in flight at that point. 535 // itself, a paint message could already be in flight at that point.
521 bool needs_repainting_on_restore_; 536 bool needs_repainting_on_restore_;
522 537
523 // This is true if the renderer is currently unresponsive. 538 // This is true if the renderer is currently unresponsive.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 // but the Char event generated by alt-2 may also activate a HTML element 587 // but the Char event generated by alt-2 may also activate a HTML element
573 // if its accesskey happens to be "2", then the user may get confused when 588 // if its accesskey happens to be "2", then the user may get confused when
574 // switching back to the original tab, because the content may already be 589 // switching back to the original tab, because the content may already be
575 // changed. 590 // changed.
576 bool suppress_next_char_events_; 591 bool suppress_next_char_events_;
577 592
578 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); 593 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
579 }; 594 };
580 595
581 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 596 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698