Index: services/ui/public/interfaces/ime/ime.mojom |
diff --git a/services/ui/public/interfaces/ime/ime.mojom b/services/ui/public/interfaces/ime/ime.mojom |
index d491da30436bdd51438c562b56f72086b604bd68..c122750e99d4a18f748348fad9808c25e801c7ab 100644 |
--- a/services/ui/public/interfaces/ime/ime.mojom |
+++ b/services/ui/public/interfaces/ime/ime.mojom |
@@ -4,6 +4,7 @@ |
module ui.mojom; |
+import "mojo/common/text_direction.mojom"; |
import "ui/events/mojo/event.mojom"; |
import "ui/gfx/geometry/mojo/geometry.mojom"; |
import "ui/gfx/range/mojo/range.mojom"; |
@@ -64,14 +65,26 @@ enum TextInputMode { |
URL, |
}; |
+// Parameters needed to start an IME session. |
+struct StartSessionDetails { |
+ TextInputClient client; |
+ InputMethod& input_method_request; |
+ |
+ // Initial details about |client| required by IMEDriver. |
+ TextInputType text_input_type; |
+ TextInputMode text_input_mode; |
+ mojo.common.mojom.TextDirection text_direction; |
+ int32 text_input_flags; |
+ gfx.mojom.Rect caret_bounds; |
+}; |
+ |
// A service which provides the IMEDriver interface is responsible for doing |
// the composition logic. After starting a session, it receives events from |
// the client via the InputMethod interface, and sends composition events to |
// the client via the TextInputClient. |
interface IMEDriver { |
// session_id is unique and generated by Mus. |
- StartSession(int32 session_id, TextInputClient client, |
- InputMethod& input_method); |
+ StartSession(int32 session_id, StartSessionDetails details); |
CancelSession(int32 session_id); |
}; |
@@ -79,8 +92,7 @@ interface IMEDriver { |
// does minimal processing and mostly just acts as lightweight proxy between |
// the client app and the registered IME driver. |
interface IMEServer { |
- StartSession(TextInputClient client, |
- InputMethod& input_method); |
+ StartSession(StartSessionDetails details); |
}; |
// An IME driver register should register itself to Mus using the IMERegistrar |