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

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

Issue 2121953002: Do not calculate composition bounds until IME requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [WIP] waiting trybots Created 4 years, 5 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 // Checks if the selection bounds have been changed. If they are changed, 343 // Checks if the selection bounds have been changed. If they are changed,
344 // the new value will be sent to the browser process. 344 // the new value will be sent to the browser process.
345 void UpdateSelectionBounds(); 345 void UpdateSelectionBounds();
346 346
347 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); 347 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end);
348 348
349 void OnShowHostContextMenu(ContextMenuParams* params); 349 void OnShowHostContextMenu(ContextMenuParams* params);
350 350
351 // Checks if the composition range or composition character bounds have been 351 // Checks if the composition range or composition character bounds have been
352 // changed. If they are changed, the new value will be sent to the browser 352 // changed. If they are changed, the new value will be sent to the browser
kinaba 2016/07/06 06:08:33 Could you update the comment reflecting the force_
Seigo Nonaka 2016/07/06 06:22:18 Done.
353 // process. This method does nothing when the browser process is not able to 353 // process. This method does nothing when the browser process is not able to
354 // handle composition range and composition character bounds. 354 // handle composition range and composition character bounds.
355 void UpdateCompositionInfo(bool should_update_range); 355 void UpdateCompositionInfo(bool should_update_range, bool force_update);
356 356
357 // Change the device ICC color profile while running a layout test. 357 // Change the device ICC color profile while running a layout test.
358 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); 358 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile);
359 void ResetDeviceColorProfileForTesting(); 359 void ResetDeviceColorProfileForTesting();
360 360
361 // Indicates whether this widget has focus. 361 // Indicates whether this widget has focus.
362 bool has_focus() const { return has_focus_; } 362 bool has_focus() const { return has_focus_; }
363 363
364 MouseLockDispatcher* mouse_lock_dispatcher() { 364 MouseLockDispatcher* mouse_lock_dispatcher() {
365 return mouse_lock_dispatcher_.get(); 365 return mouse_lock_dispatcher_.get();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 #if defined(OS_ANDROID) 475 #if defined(OS_ANDROID)
476 // Called when we send IME event that expects an ACK. 476 // Called when we send IME event that expects an ACK.
477 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); 477 void OnImeEventSentForAck(const blink::WebTextInputInfo& info);
478 478
479 // Called by the browser process for every required IME acknowledgement. 479 // Called by the browser process for every required IME acknowledgement.
480 void OnImeEventAck(); 480 void OnImeEventAck();
481 481
482 // Called by the browser process to update text input state. 482 // Called by the browser process to update text input state.
483 void OnRequestTextInputStateUpdate(); 483 void OnRequestTextInputStateUpdate();
484
485 // Called by the browser process to update the cursor and composition
486 // information.
487 void OnRequestCursorUpdate(bool immediate_request, bool monitor_request);
kinaba 2016/07/06 06:08:33 How about naming "OnRequestCompositionUpdate"? At
Seigo Nonaka 2016/07/06 06:22:18 Make sense to me. Similarly, also I updated IPC na
484 #endif 488 #endif
485 489
486 // Notify the compositor about a change in viewport size. This should be 490 // Notify the compositor about a change in viewport size. This should be
487 // used only with auto resize mode WebWidgets, as normal WebWidgets should 491 // used only with auto resize mode WebWidgets, as normal WebWidgets should
488 // go through OnResize. 492 // go through OnResize.
489 void AutoResizeCompositor(); 493 void AutoResizeCompositor();
490 494
491 virtual void SetDeviceScaleFactor(float device_scale_factor); 495 virtual void SetDeviceScaleFactor(float device_scale_factor);
492 bool SetDeviceColorProfile(const std::vector<char>& color_profile); 496 bool SetDeviceColorProfile(const std::vector<char>& color_profile);
493 497
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 #if defined(OS_ANDROID) 722 #if defined(OS_ANDROID)
719 // Indicates value in the focused text field is in dirty state, i.e. modified 723 // Indicates value in the focused text field is in dirty state, i.e. modified
720 // by script etc., not by user input. 724 // by script etc., not by user input.
721 bool text_field_is_dirty_; 725 bool text_field_is_dirty_;
722 726
723 // Stores the history of text input infos from the last ACK'ed one from the 727 // Stores the history of text input infos from the last ACK'ed one from the
724 // current one. The size is the number of pending ACKs plus one, since we 728 // current one. The size is the number of pending ACKs plus one, since we
725 // intentionally keep the last ack'd value to know what the browser is 729 // intentionally keep the last ack'd value to know what the browser is
726 // currently aware of. 730 // currently aware of.
727 std::deque<blink::WebTextInputInfo> text_input_info_history_; 731 std::deque<blink::WebTextInputInfo> text_input_info_history_;
732
733 // True if the IME requests updated composition info.
734 bool monitor_composition_info_;
728 #endif 735 #endif
729 736
730 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; 737 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_;
731 738
732 // Popups may be displaced when screen metrics emulation is enabled. 739 // Popups may be displaced when screen metrics emulation is enabled.
733 // These values are used to properly adjust popup position. 740 // These values are used to properly adjust popup position.
734 gfx::Point popup_view_origin_for_emulation_; 741 gfx::Point popup_view_origin_for_emulation_;
735 gfx::Point popup_screen_origin_for_emulation_; 742 gfx::Point popup_screen_origin_for_emulation_;
736 float popup_origin_scale_for_emulation_; 743 float popup_origin_scale_for_emulation_;
737 744
(...skipping 30 matching lines...) Expand all
768 775
769 // Indicates whether this widget has focus. 776 // Indicates whether this widget has focus.
770 bool has_focus_; 777 bool has_focus_;
771 778
772 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 779 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
773 }; 780 };
774 781
775 } // namespace content 782 } // namespace content
776 783
777 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 784 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698