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 <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | |
darin (slow to review)
2012/08/06 18:27:41
nit: not needed
Iain Merrick
2012/08/13 13:17:23
Done.
| |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/callback.h" | 13 #include "base/callback.h" |
13 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
16 #include "base/process_util.h" | 17 #include "base/process_util.h" |
17 #include "base/property_bag.h" | 18 #include "base/property_bag.h" |
18 #include "base/string16.h" | 19 #include "base/string16.h" |
19 #include "base/timer.h" | 20 #include "base/timer.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
498 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); | 499 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); |
499 void OnCompositorSurfaceBuffersSwapped(int32 surface_id, | 500 void OnCompositorSurfaceBuffersSwapped(int32 surface_id, |
500 uint64 surface_handle, | 501 uint64 surface_handle, |
501 int32 route_id, | 502 int32 route_id, |
502 int32 gpu_process_host_id); | 503 int32 gpu_process_host_id); |
503 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 504 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
504 void OnMsgUpdateIsDelayed(); | 505 void OnMsgUpdateIsDelayed(); |
505 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type, | 506 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type, |
506 bool processed); | 507 bool processed); |
507 void OnMsgBeginSmoothScroll(bool scroll_down, bool scroll_far); | 508 void OnMsgBeginSmoothScroll(bool scroll_down, bool scroll_far); |
509 void OnMsgSelectRangeAck(); | |
508 virtual void OnMsgFocus(); | 510 virtual void OnMsgFocus(); |
509 virtual void OnMsgBlur(); | 511 virtual void OnMsgBlur(); |
510 void OnMsgHasTouchEventHandlers(bool has_handlers); | 512 void OnMsgHasTouchEventHandlers(bool has_handlers); |
511 | 513 |
512 void OnMsgSetCursor(const WebCursor& cursor); | 514 void OnMsgSetCursor(const WebCursor& cursor); |
513 void OnMsgTextInputStateChanged(ui::TextInputType type, | 515 void OnMsgTextInputStateChanged(ui::TextInputType type, |
514 bool can_compose_inline); | 516 bool can_compose_inline); |
515 void OnMsgImeCompositionRangeChanged( | 517 void OnMsgImeCompositionRangeChanged( |
516 const ui::Range& range, | 518 const ui::Range& range, |
517 const std::vector<gfx::Rect>& character_bounds); | 519 const std::vector<gfx::Rect>& character_bounds); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
679 // (Similar to |mouse_wheel_pending_|.). True if gesture event was sent and | 681 // (Similar to |mouse_wheel_pending_|.). True if gesture event was sent and |
680 // we are waiting for a corresponding ack. | 682 // we are waiting for a corresponding ack. |
681 bool gesture_event_pending_; | 683 bool gesture_event_pending_; |
682 | 684 |
683 typedef std::deque<WebKit::WebGestureEvent> GestureEventQueue; | 685 typedef std::deque<WebKit::WebGestureEvent> GestureEventQueue; |
684 | 686 |
685 // (Similar to |coalesced_mouse_wheel_events_|.) GestureScrollUpdate events | 687 // (Similar to |coalesced_mouse_wheel_events_|.) GestureScrollUpdate events |
686 // are coalesced by merging deltas in a similar fashion as wheel events. | 688 // are coalesced by merging deltas in a similar fashion as wheel events. |
687 GestureEventQueue coalesced_gesture_events_; | 689 GestureEventQueue coalesced_gesture_events_; |
688 | 690 |
691 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. | |
692 bool select_range_pending_; | |
693 | |
694 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. | |
695 struct SelectionRange { | |
696 gfx::Point start, end; | |
697 }; | |
698 scoped_ptr<SelectionRange> next_select_range_; | |
darin (slow to review)
2012/08/06 18:27:41
nit: next_selection_range_ <-- type is "Selectio
Iain Merrick
2012/08/13 13:17:23
Done.
| |
699 | |
689 // The time when an input event was sent to the RenderWidget. | 700 // The time when an input event was sent to the RenderWidget. |
690 base::TimeTicks input_event_start_time_; | 701 base::TimeTicks input_event_start_time_; |
691 | 702 |
692 // Keyboard event listeners. | 703 // Keyboard event listeners. |
693 std::list<KeyboardListener*> keyboard_listeners_; | 704 std::list<KeyboardListener*> keyboard_listeners_; |
694 | 705 |
695 // If true, then we should repaint when restoring even if we have a | 706 // If true, then we should repaint when restoring even if we have a |
696 // backingstore. This flag is set to true if we receive a paint message | 707 // backingstore. This flag is set to true if we receive a paint message |
697 // while is_hidden_ to true. Even though we tell the render widget to hide | 708 // while is_hidden_ to true. Even though we tell the render widget to hide |
698 // itself, a paint message could already be in flight at that point. | 709 // itself, a paint message could already be in flight at that point. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
778 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 789 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
779 | 790 |
780 scoped_ptr<SmoothScrollGesture> active_smooth_scroll_gesture_; | 791 scoped_ptr<SmoothScrollGesture> active_smooth_scroll_gesture_; |
781 | 792 |
782 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 793 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
783 }; | 794 }; |
784 | 795 |
785 } // namespace content | 796 } // namespace content |
786 | 797 |
787 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 798 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |