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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // Check whether the WebWidget has any touch event handlers registered | 530 // Check whether the WebWidget has any touch event handlers registered |
531 // at the given point. | 531 // at the given point. |
532 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; | 532 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; |
533 | 533 |
534 // Check whether the WebWidget has any touch event handlers registered. | 534 // Check whether the WebWidget has any touch event handlers registered. |
535 virtual void hasTouchEventHandlers(bool has_handlers); | 535 virtual void hasTouchEventHandlers(bool has_handlers); |
536 | 536 |
537 // Tell the browser about the actions permitted for a new touch point. | 537 // Tell the browser about the actions permitted for a new touch point. |
538 virtual void setTouchAction(blink::WebTouchAction touch_action); | 538 virtual void setTouchAction(blink::WebTouchAction touch_action); |
539 | 539 |
| 540 #if defined(OS_ANDROID) |
| 541 // Checks if the selection root bounds have changed. If they have changed, the |
| 542 // new value will be sent to the browser process. |
| 543 virtual void UpdateSelectionRootBounds(); |
| 544 #endif |
| 545 |
540 // Creates a 3D context associated with this view. | 546 // Creates a 3D context associated with this view. |
541 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( | 547 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( |
542 const blink::WebGraphicsContext3D::Attributes& attributes); | 548 const blink::WebGraphicsContext3D::Attributes& attributes); |
543 | 549 |
544 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); | 550 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); |
545 | 551 |
546 // Routing ID that allows us to communicate to the parent browser process | 552 // Routing ID that allows us to communicate to the parent browser process |
547 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 553 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
548 int32 routing_id_; | 554 int32 routing_id_; |
549 | 555 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 // Stores the current text input mode of |webwidget_|. | 679 // Stores the current text input mode of |webwidget_|. |
674 ui::TextInputMode text_input_mode_; | 680 ui::TextInputMode text_input_mode_; |
675 | 681 |
676 // Stores the current type of composition text rendering of |webwidget_|. | 682 // Stores the current type of composition text rendering of |webwidget_|. |
677 bool can_compose_inline_; | 683 bool can_compose_inline_; |
678 | 684 |
679 // Stores the current selection bounds. | 685 // Stores the current selection bounds. |
680 gfx::Rect selection_focus_rect_; | 686 gfx::Rect selection_focus_rect_; |
681 gfx::Rect selection_anchor_rect_; | 687 gfx::Rect selection_anchor_rect_; |
682 | 688 |
| 689 // Stores the current selection root bounds. |
| 690 #if defined(OS_ANDROID) |
| 691 gfx::Rect selection_root_rect_; |
| 692 #endif |
| 693 |
683 // Stores the current composition character bounds. | 694 // Stores the current composition character bounds. |
684 std::vector<gfx::Rect> composition_character_bounds_; | 695 std::vector<gfx::Rect> composition_character_bounds_; |
685 | 696 |
686 // Stores the current composition range. | 697 // Stores the current composition range. |
687 gfx::Range composition_range_; | 698 gfx::Range composition_range_; |
688 | 699 |
689 // The kind of popup this widget represents, NONE if not a popup. | 700 // The kind of popup this widget represents, NONE if not a popup. |
690 blink::WebPopupType popup_type_; | 701 blink::WebPopupType popup_type_; |
691 | 702 |
692 // Holds all the needed plugin window moves for a scroll. | 703 // Holds all the needed plugin window moves for a scroll. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 | 800 |
790 ui::MenuSourceType context_menu_source_type_; | 801 ui::MenuSourceType context_menu_source_type_; |
791 gfx::Point touch_editing_context_menu_location_; | 802 gfx::Point touch_editing_context_menu_location_; |
792 | 803 |
793 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 804 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
794 }; | 805 }; |
795 | 806 |
796 } // namespace content | 807 } // namespace content |
797 | 808 |
798 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 809 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |