| Index: services/ui/public/interfaces/ime.mojom
|
| diff --git a/services/ui/public/interfaces/ime.mojom b/services/ui/public/interfaces/ime.mojom
|
| deleted file mode 100644
|
| index af86e21106fbd5a61000072b52704f35c104b457..0000000000000000000000000000000000000000
|
| --- a/services/ui/public/interfaces/ime.mojom
|
| +++ /dev/null
|
| @@ -1,116 +0,0 @@
|
| -// Copyright 2016 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -module ui.mojom;
|
| -
|
| -import "ui/events/mojo/event.mojom";
|
| -import "ui/gfx/geometry/mojo/geometry.mojom";
|
| -
|
| -struct CompositionEvent {
|
| - CompositionEventType type;
|
| -
|
| - // Used when |type| is INSERT_CHAR. See the comments for
|
| - // ui::TextInputClient::InsertChar() for more information.
|
| - Event? key_event;
|
| -
|
| - // TODO(moshayedi): crbug.com/631524. Add fields required for other types of
|
| - // composition event.
|
| -};
|
| -
|
| -enum CompositionEventType {
|
| - UPDATE,
|
| - CONFIRM,
|
| - CLEAR,
|
| - INSERT_CHAR,
|
| - INSERT_TEXT
|
| -};
|
| -
|
| -// See comments for ui::TextInputType for more details.
|
| -enum TextInputType {
|
| - NONE,
|
| - TEXT,
|
| - PASSWORD,
|
| - SEARCH,
|
| - EMAIL,
|
| - NUMBER,
|
| - TELEPHONE,
|
| - URL,
|
| - DATE,
|
| - TIME,
|
| - DATETIME,
|
| -};
|
| -
|
| -// See comments for ui::TextInputMode for more details.
|
| -enum TextInputMode {
|
| - DEFAULT,
|
| - VERBATIM,
|
| - LATIN,
|
| - LATIN_NAME,
|
| - LATIN_PROSE,
|
| - FULL_WIDTH_LATIN,
|
| - KANA,
|
| - KATAKANA,
|
| - NUMERIC,
|
| - TEL,
|
| - EMAIL,
|
| - URL,
|
| -};
|
| -
|
| -// 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);
|
| - CancelSession(int32 session_id);
|
| -};
|
| -
|
| -// Clients use IME using the IMEServer interface which is provided by Mus. Mus
|
| -// 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);
|
| -};
|
| -
|
| -// An IME driver register should register itself to Mus using the IMERegistrar
|
| -// interface.
|
| -interface IMERegistrar {
|
| - RegisterDriver(IMEDriver driver);
|
| -};
|
| -
|
| -// A client sends updates to the IME driver using the InputMethod interface.
|
| -// This interface is provided by IME drivers, and also by Mus as a lightweight
|
| -// proxy between IME drivers and clients.
|
| -interface InputMethod {
|
| - OnTextInputModeChanged(TextInputMode text_input_mode);
|
| - OnTextInputTypeChanged(TextInputType text_input_type);
|
| -
|
| - // Client sends |caret_bounds| in focused window coordinates,
|
| - // Mus translates it to global coordinates and sends it to IME app.
|
| - OnCaretBoundsChanged(gfx.mojom.Rect caret_bounds);
|
| -
|
| - // Called to process a key event. The callback function will be called to
|
| - // notify the client if the event was handled or not. A handled event may
|
| - // generate zero or more composition events which will be sent to the client
|
| - // by calling TextInputClient::OnCompositionEvent().
|
| - ProcessKeyEvent(ui.mojom.Event key_event) => (bool handled);
|
| -
|
| - CancelComposition();
|
| -};
|
| -
|
| -// IME drivers send updates to clients using the TextInputClient interface.
|
| -interface TextInputClient {
|
| - // Corresponds to "input method result" functions of ui::TextInputClient.
|
| - // See comments for InputMethod::ProcessKeyEvent() for when this is called.
|
| - OnCompositionEvent(CompositionEvent event);
|
| -
|
| - // TODO(moshayedi): Add functions corresponding to ui::TextInputClient for:
|
| - // - Input text confirmation
|
| - // - Document content operations
|
| - // - Miscellaneous functions
|
| - // crbug.com/631527.
|
| -};
|
|
|