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 <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 const std::string& value); | 361 const std::string& value); |
362 | 362 |
363 // Tells the renderer to scroll the currently focused node into rect only if | 363 // Tells the renderer to scroll the currently focused node into rect only if |
364 // the currently focused node is a Text node (textfield, text area or content | 364 // the currently focused node is a Text node (textfield, text area or content |
365 // editable divs). | 365 // editable divs). |
366 void ScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); | 366 void ScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); |
367 | 367 |
368 // Requests the renderer to select the region between two points. | 368 // Requests the renderer to select the region between two points. |
369 void SelectRange(const gfx::Point& start, const gfx::Point& end); | 369 void SelectRange(const gfx::Point& start, const gfx::Point& end); |
370 | 370 |
| 371 // Requests the renderer to move the caret selection towards the point. |
| 372 void MoveCaret(const gfx::Point& point); |
| 373 |
371 // Called when the reponse to a pending mouse lock request has arrived. | 374 // Called when the reponse to a pending mouse lock request has arrived. |
372 // Returns true if |allowed| is true and the mouse has been successfully | 375 // Returns true if |allowed| is true and the mouse has been successfully |
373 // locked. | 376 // locked. |
374 bool GotResponseToLockMouseRequest(bool allowed); | 377 bool GotResponseToLockMouseRequest(bool allowed); |
375 | 378 |
376 // Tells the RenderWidget about the latest vsync parameters. | 379 // Tells the RenderWidget about the latest vsync parameters. |
377 // Note: Make sure the timebase was obtained using | 380 // Note: Make sure the timebase was obtained using |
378 // base::TimeTicks::HighResNow. Using the non-high res timer will result in | 381 // base::TimeTicks::HighResNow. Using the non-high res timer will result in |
379 // incorrect synchronization across processes. | 382 // incorrect synchronization across processes. |
380 virtual void UpdateVSyncParameters(base::TimeTicks timebase, | 383 virtual void UpdateVSyncParameters(base::TimeTicks timebase, |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 int32 gpu_process_host_id); | 557 int32 gpu_process_host_id); |
555 void OnSwapCompositorFrame(const cc::CompositorFrame& frame); | 558 void OnSwapCompositorFrame(const cc::CompositorFrame& frame); |
556 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 559 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
557 void OnUpdateIsDelayed(); | 560 void OnUpdateIsDelayed(); |
558 void OnInputEventAck(WebKit::WebInputEvent::Type event_type, | 561 void OnInputEventAck(WebKit::WebInputEvent::Type event_type, |
559 InputEventAckState ack_result); | 562 InputEventAckState ack_result); |
560 void OnBeginSmoothScroll( | 563 void OnBeginSmoothScroll( |
561 int gesture_id, | 564 int gesture_id, |
562 const ViewHostMsg_BeginSmoothScroll_Params ¶ms); | 565 const ViewHostMsg_BeginSmoothScroll_Params ¶ms); |
563 void OnSelectRangeAck(); | 566 void OnSelectRangeAck(); |
| 567 void OnMsgMoveCaretAck(); |
564 virtual void OnFocus(); | 568 virtual void OnFocus(); |
565 virtual void OnBlur(); | 569 virtual void OnBlur(); |
566 void OnHasTouchEventHandlers(bool has_handlers); | 570 void OnHasTouchEventHandlers(bool has_handlers); |
567 void OnSetCursor(const WebCursor& cursor); | 571 void OnSetCursor(const WebCursor& cursor); |
568 void OnTextInputStateChanged( | 572 void OnTextInputStateChanged( |
569 const ViewHostMsg_TextInputState_Params& params); | 573 const ViewHostMsg_TextInputState_Params& params); |
570 void OnImeCompositionRangeChanged( | 574 void OnImeCompositionRangeChanged( |
571 const ui::Range& range, | 575 const ui::Range& range, |
572 const std::vector<gfx::Rect>& character_bounds); | 576 const std::vector<gfx::Rect>& character_bounds); |
573 void OnImeCancelComposition(); | 577 void OnImeCancelComposition(); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 | 759 |
756 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. | 760 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. |
757 bool select_range_pending_; | 761 bool select_range_pending_; |
758 | 762 |
759 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. | 763 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. |
760 struct SelectionRange { | 764 struct SelectionRange { |
761 gfx::Point start, end; | 765 gfx::Point start, end; |
762 }; | 766 }; |
763 scoped_ptr<SelectionRange> next_selection_range_; | 767 scoped_ptr<SelectionRange> next_selection_range_; |
764 | 768 |
| 769 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK. |
| 770 bool move_caret_pending_; |
| 771 |
| 772 // (Similar to |next_mouse_move_|.) The next MoveCaret to send, if any. |
| 773 scoped_ptr<gfx::Point> next_move_caret_; |
| 774 |
765 // The time when an input event was sent to the RenderWidget. | 775 // The time when an input event was sent to the RenderWidget. |
766 base::TimeTicks input_event_start_time_; | 776 base::TimeTicks input_event_start_time_; |
767 | 777 |
768 // Keyboard event listeners. | 778 // Keyboard event listeners. |
769 std::list<KeyboardListener*> keyboard_listeners_; | 779 std::list<KeyboardListener*> keyboard_listeners_; |
770 | 780 |
771 // If true, then we should repaint when restoring even if we have a | 781 // If true, then we should repaint when restoring even if we have a |
772 // backingstore. This flag is set to true if we receive a paint message | 782 // backingstore. This flag is set to true if we receive a paint message |
773 // while is_hidden_ to true. Even though we tell the render widget to hide | 783 // while is_hidden_ to true. Even though we tell the render widget to hide |
774 // itself, a paint message could already be in flight at that point. | 784 // itself, a paint message could already be in flight at that point. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 #if defined(OS_WIN) | 874 #if defined(OS_WIN) |
865 std::list<HWND> dummy_windows_for_activation_; | 875 std::list<HWND> dummy_windows_for_activation_; |
866 #endif | 876 #endif |
867 | 877 |
868 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 878 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
869 }; | 879 }; |
870 | 880 |
871 } // namespace content | 881 } // namespace content |
872 | 882 |
873 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 883 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |