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

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

Issue 300323005: Route selection bounds updates through the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Defer selection updates until after compositor scheduling Created 6 years, 6 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void OnSwapBuffersAborted(); 236 void OnSwapBuffersAborted();
237 237
238 // Checks if the text input state and compose inline mode have been changed. 238 // Checks if the text input state and compose inline mode have been changed.
239 // If they are changed, the new value will be sent to the browser process. 239 // If they are changed, the new value will be sent to the browser process.
240 void UpdateTextInputType(); 240 void UpdateTextInputType();
241 241
242 // Checks if the selection bounds have been changed. If they are changed, 242 // Checks if the selection bounds have been changed. If they are changed,
243 // the new value will be sent to the browser process. 243 // the new value will be sent to the browser process.
244 void UpdateSelectionBounds(); 244 void UpdateSelectionBounds();
245 245
246 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); 246 // Returns false if the selection bounds should not be updated.
247 virtual bool GetSelectionBounds(gfx::Rect* start, gfx::Rect* end);
247 248
248 void OnShowHostContextMenu(ContextMenuParams* params); 249 void OnShowHostContextMenu(ContextMenuParams* params);
249 250
250 #if defined(OS_ANDROID) || defined(USE_AURA) 251 #if defined(OS_ANDROID) || defined(USE_AURA)
251 enum ShowIme { 252 enum ShowIme {
252 SHOW_IME_IF_NEEDED, 253 SHOW_IME_IF_NEEDED,
253 NO_SHOW_IME, 254 NO_SHOW_IME,
254 }; 255 };
255 256
256 enum ChangeSource { 257 enum ChangeSource {
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 612
612 // Stores the current text input mode of |webwidget_|. 613 // Stores the current text input mode of |webwidget_|.
613 ui::TextInputMode text_input_mode_; 614 ui::TextInputMode text_input_mode_;
614 615
615 // Stores the current type of composition text rendering of |webwidget_|. 616 // Stores the current type of composition text rendering of |webwidget_|.
616 bool can_compose_inline_; 617 bool can_compose_inline_;
617 618
618 // Stores the current selection bounds. 619 // Stores the current selection bounds.
619 gfx::Rect selection_focus_rect_; 620 gfx::Rect selection_focus_rect_;
620 gfx::Rect selection_anchor_rect_; 621 gfx::Rect selection_anchor_rect_;
622 bool enable_composited_selection_bounds_;
621 623
622 // Stores the current composition character bounds. 624 // Stores the current composition character bounds.
623 std::vector<gfx::Rect> composition_character_bounds_; 625 std::vector<gfx::Rect> composition_character_bounds_;
624 626
625 // Stores the current composition range. 627 // Stores the current composition range.
626 gfx::Range composition_range_; 628 gfx::Range composition_range_;
627 629
628 // The kind of popup this widget represents, NONE if not a popup. 630 // The kind of popup this widget represents, NONE if not a popup.
629 blink::WebPopupType popup_type_; 631 blink::WebPopupType popup_type_;
630 632
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 714
713 ui::MenuSourceType context_menu_source_type_; 715 ui::MenuSourceType context_menu_source_type_;
714 gfx::Point touch_editing_context_menu_location_; 716 gfx::Point touch_editing_context_menu_location_;
715 717
716 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 718 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
717 }; 719 };
718 720
719 } // namespace content 721 } // namespace content
720 722
721 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 723 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698