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

Side by Side Diff: content/renderer/render_widget.h

Issue 186753002: Chromium plumbing to use the selection root bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
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_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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void OnSwapBuffersAborted(); 225 void OnSwapBuffersAborted();
226 226
227 // Checks if the text input state and compose inline mode have been changed. 227 // Checks if the text input state and compose inline mode have been changed.
228 // If they are changed, the new value will be sent to the browser process. 228 // If they are changed, the new value will be sent to the browser process.
229 void UpdateTextInputType(); 229 void UpdateTextInputType();
230 230
231 // Checks if the selection bounds have been changed. If they are changed, 231 // Checks if the selection bounds have been changed. If they are changed,
232 // the new value will be sent to the browser process. 232 // the new value will be sent to the browser process.
233 void UpdateSelectionBounds(); 233 void UpdateSelectionBounds();
234 234
235 // Checks if the selection root bounds have changed. If they have changed, the
236 // new value will be sent to the browser process.
237 void UpdateSelectionRootBounds();
238
235 void OnShowHostContextMenu(ContextMenuParams* params); 239 void OnShowHostContextMenu(ContextMenuParams* params);
236 240
237 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) 241 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
238 // Checks if the composition range or composition character bounds have been 242 // Checks if the composition range or composition character bounds have been
239 // changed. If they are changed, the new value will be sent to the browser 243 // changed. If they are changed, the new value will be sent to the browser
240 // process. 244 // process.
241 void UpdateCompositionInfo(bool should_update_range); 245 void UpdateCompositionInfo(bool should_update_range);
242 #endif 246 #endif
243 247
244 // Temporary for debugging purposes... 248 // Temporary for debugging purposes...
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // acknowledge the change before the renderer handles any more IME events. 453 // acknowledge the change before the renderer handles any more IME events.
450 // This is when the event did not originate from the browser side IME, such as 454 // This is when the event did not originate from the browser side IME, such as
451 // changes from JavaScript or autofill. 455 // changes from JavaScript or autofill.
452 void UpdateTextInputState(bool show_ime_if_needed, bool send_ime_ack); 456 void UpdateTextInputState(bool show_ime_if_needed, bool send_ime_ack);
453 #endif 457 #endif
454 458
455 // Override point to obtain that the current input method state and caret 459 // Override point to obtain that the current input method state and caret
456 // position. 460 // position.
457 virtual ui::TextInputType GetTextInputType(); 461 virtual ui::TextInputType GetTextInputType();
458 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); 462 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end);
463 virtual void GetSelectionRootBounds(gfx::Rect* bounds);
459 virtual ui::TextInputType WebKitToUiTextInputType( 464 virtual ui::TextInputType WebKitToUiTextInputType(
460 blink::WebTextInputType type); 465 blink::WebTextInputType type);
461 466
462 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) 467 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
463 // Override point to obtain that the current composition character bounds. 468 // Override point to obtain that the current composition character bounds.
464 // In the case of surrogate pairs, the character is treated as two characters: 469 // In the case of surrogate pairs, the character is treated as two characters:
465 // the bounds for first character is actual one, and the bounds for second 470 // the bounds for first character is actual one, and the bounds for second
466 // character is zero width rectangle. 471 // character is zero width rectangle.
467 virtual void GetCompositionCharacterBounds( 472 virtual void GetCompositionCharacterBounds(
468 std::vector<gfx::Rect>* character_bounds); 473 std::vector<gfx::Rect>* character_bounds);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 // Stores the current text input mode of |webwidget_|. 673 // Stores the current text input mode of |webwidget_|.
669 ui::TextInputMode text_input_mode_; 674 ui::TextInputMode text_input_mode_;
670 675
671 // Stores the current type of composition text rendering of |webwidget_|. 676 // Stores the current type of composition text rendering of |webwidget_|.
672 bool can_compose_inline_; 677 bool can_compose_inline_;
673 678
674 // Stores the current selection bounds. 679 // Stores the current selection bounds.
675 gfx::Rect selection_focus_rect_; 680 gfx::Rect selection_focus_rect_;
676 gfx::Rect selection_anchor_rect_; 681 gfx::Rect selection_anchor_rect_;
677 682
683 // Stores the current selection root bounds.
684 gfx::Rect selection_root_rect_;
685
678 // Stores the current composition character bounds. 686 // Stores the current composition character bounds.
679 std::vector<gfx::Rect> composition_character_bounds_; 687 std::vector<gfx::Rect> composition_character_bounds_;
680 688
681 // Stores the current composition range. 689 // Stores the current composition range.
682 gfx::Range composition_range_; 690 gfx::Range composition_range_;
683 691
684 // The kind of popup this widget represents, NONE if not a popup. 692 // The kind of popup this widget represents, NONE if not a popup.
685 blink::WebPopupType popup_type_; 693 blink::WebPopupType popup_type_;
686 694
687 // Holds all the needed plugin window moves for a scroll. 695 // Holds all the needed plugin window moves for a scroll.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 792
785 ui::MenuSourceType context_menu_source_type_; 793 ui::MenuSourceType context_menu_source_type_;
786 gfx::Point touch_editing_context_menu_location_; 794 gfx::Point touch_editing_context_menu_location_;
787 795
788 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 796 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
789 }; 797 };
790 798
791 } // namespace content 799 } // namespace content
792 800
793 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 801 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698