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

Unified Diff: chrome/browser/chromeos/input_method/mozc_commands.diff

Issue 8505051: Support mozc suggest window on ChromeOS. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix few bugs Created 9 years, 1 month 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
Index: chrome/browser/chromeos/input_method/mozc_commands.diff
diff --git a/chrome/browser/chromeos/input_method/mozc_commands.diff b/chrome/browser/chromeos/input_method/mozc_commands.diff
new file mode 100644
index 0000000000000000000000000000000000000000..1e9d4d8c0d419ace0f67bf6971e65b183316fdf6
--- /dev/null
+++ b/chrome/browser/chromeos/input_method/mozc_commands.diff
@@ -0,0 +1,63 @@
+Index: commands.proto
+===================================================================
+--- commands.proto (revision 58)
++++ commands.proto (working copy)
+@@ -219,6 +219,13 @@
+ };
+
+
++message Rectangle {
++ required int32 x = 1;
++ required int32 y = 2;
++ required int32 width = 3;
++ required int32 height = 4;
++}
++
+ message SessionCommand {
+ enum CommandType {
+ // Revert the session, this is usually similar to type ESC several times.
+@@ -255,6 +262,12 @@
+
+ // Change cursor position in preedit.
+ MOVE_CURSOR = 11;
++
++ // The client can send the current caret position whenever the caret
++ // position is changed. The caret position is used for suggest window
++ // position calculation. This is an optional message. If client can show
++ // suggest window on the correct position, this message can be ignored.
++ SEND_CARET_LOCATION = 12;
+ };
+ required CommandType type = 1;
+
+@@ -269,6 +282,10 @@
+
+ // New cursor position in preedit. Used with MOVE_CURSOR.
+ optional uint32 cursor_position = 5;
++
++ // Specify the current caret location, this is used for suggest window
++ // position calculation. Used with SEND_CARET_LOCATION.
++ optional Rectangle caret_rectangle = 9;
+ };
+
+ message Context {
+@@ -582,6 +599,20 @@
+ HORIZONTAL = 1;
+ };
+ optional Direction direction = 14 [ default = VERTICAL ];
++
++ // This position is used for suggest window position.
++ optional Rectangle composition_rectangle = 15;
++ optional Rectangle caret_rectangle = 16;
++
++ enum CandidateWindowLocation{
++ // Shows candidate window under the caret. This is used for prediction and
++ // conversion
++ CARET = 0;
++ // Shows candidate window aligned with composition area. This is used for
++ // suggestion.
++ COMPOSITION = 1;
++ }
++ optional CandidateWindowLocation window_location = 17;
+ };
+
+ message Status {

Powered by Google App Engine
This is Rietveld 408576698