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

Unified 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: fix test failures Created 4 years, 4 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index c91e0b83841cce5d3acffe130c73d5a7c27ae08c..daee7170916a6f19d73599d623067aec40007639 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -352,7 +352,9 @@ class CONTENT_EXPORT RenderWidget
// changed. If they are changed, the new value will be sent to the browser
// process. This method does nothing when the browser process is not able to
// handle composition range and composition character bounds.
- void UpdateCompositionInfo(bool should_update_range);
+ // If immediate_request is true, render sends the latest composition info to
+ // the browser even if the composition info is not changed.
+ void UpdateCompositionInfo(bool immediate_request);
// Change the device ICC color profile while running a layout test.
void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile);
@@ -494,6 +496,10 @@ class CONTENT_EXPORT RenderWidget
void OnRequestTextInputStateUpdate();
#endif
+ // Called by the browser process to update the cursor and composition
+ // information.
+ void OnRequestCompositionUpdate(bool immediate_request, bool monitor_request);
+
// Notify the compositor about a change in viewport size. This should be
// used only with auto resize mode WebWidgets, as normal WebWidgets should
// go through OnResize.
@@ -738,6 +744,9 @@ class CONTENT_EXPORT RenderWidget
std::deque<blink::WebTextInputInfo> text_input_info_history_;
#endif
+ // True if the IME requests updated composition info.
+ bool monitor_composition_info_;
+
std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_;
// Popups may be displaced when screen metrics emulation is enabled.
« 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