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

Side by Side Diff: services/ui/public/interfaces/ime.mojom

Issue 2230393002: IME for Mus: Make InputMethodMus use the IME Mojo API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update mash_browser_tests_manifest. Created 4 years, 3 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 | « services/ui/ime/test_ime_driver/test_ime_driver.cc ('k') | services/ui/service.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 module ui.mojom; 5 module ui.mojom;
6 6
7 import "ui/events/mojo/event.mojom"; 7 import "ui/events/mojo/event.mojom";
8 import "ui/gfx/geometry/mojo/geometry.mojom"; 8 import "ui/gfx/geometry/mojo/geometry.mojom";
9 9
10 struct CompositionEvent { 10 struct CompositionEvent {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // This interface is provided by IME drivers, and also by Mus as a lightweight 86 // This interface is provided by IME drivers, and also by Mus as a lightweight
87 // proxy between IME drivers and clients. 87 // proxy between IME drivers and clients.
88 interface InputMethod { 88 interface InputMethod {
89 OnTextInputModeChanged(TextInputMode text_input_mode); 89 OnTextInputModeChanged(TextInputMode text_input_mode);
90 OnTextInputTypeChanged(TextInputType text_input_type); 90 OnTextInputTypeChanged(TextInputType text_input_type);
91 91
92 // Client sends |caret_bounds| in focused window coordinates, 92 // Client sends |caret_bounds| in focused window coordinates,
93 // Mus translates it to global coordinates and sends it to IME app. 93 // Mus translates it to global coordinates and sends it to IME app.
94 OnCaretBoundsChanged(gfx.mojom.Rect caret_bounds); 94 OnCaretBoundsChanged(gfx.mojom.Rect caret_bounds);
95 95
96 // Called to process a key event. If InputMethod handles the event, it will
97 // notify the client of the resulting composition events (there might be none)
98 // by calling TextInputClient::OnCompositionEvent(). If the event is not
99 // handled by InputMethod, TextInputClient::OnUnhandledEvent() is called.
96 ProcessKeyEvent(ui.mojom.Event key_event); 100 ProcessKeyEvent(ui.mojom.Event key_event);
101
97 CancelComposition(); 102 CancelComposition();
98 }; 103 };
99 104
100 // IME drivers send updates to clients using the TextInputClient interface. 105 // IME drivers send updates to clients using the TextInputClient interface.
101 interface TextInputClient { 106 interface TextInputClient {
102 // Corresponds to "input method result" functions of ui::TextInputClient. 107 // Corresponds to "input method result" functions of ui::TextInputClient.
108 // See comments for InputMethod::ProcessKeyEvent() for when this is called.
103 OnCompositionEvent(CompositionEvent event); 109 OnCompositionEvent(CompositionEvent event);
104 110
111 // See comments for InputMethod::ProcessKeyEvent() for when this is called.
112 OnUnhandledEvent(ui.mojom.Event key_event);
113
105 // TODO(moshayedi): Add functions corresponding to ui::TextInputClient for: 114 // TODO(moshayedi): Add functions corresponding to ui::TextInputClient for:
106 // - Input text confirmation 115 // - Input text confirmation
107 // - Document content operations 116 // - Document content operations
108 // - Miscellaneous functions 117 // - Miscellaneous functions
109 // crbug.com/631527. 118 // crbug.com/631527.
110 }; 119 };
OLDNEW
« no previous file with comments | « services/ui/ime/test_ime_driver/test_ime_driver.cc ('k') | services/ui/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698