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

Side by Side Diff: components/arc/common/ime.mojom

Issue 2039233003: Showing virtual keyboard when input type changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ImeHost.ShowImeIfNeeded to ARC bridge Created 4 years, 6 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
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 arc.mojom; 5 module arc.mojom;
6 6
7 // Represents the type of text input field currently focused. 7 // Represents the type of text input field currently focused.
8 [Extensible] 8 [Extensible]
9 enum TextInputType { 9 enum TextInputType {
10 NONE, 10 NONE,
(...skipping 20 matching lines...) Expand all
31 // Represents a single segment of text currently composed by IME. 31 // Represents a single segment of text currently composed by IME.
32 struct CompositionSegment { 32 struct CompositionSegment {
33 // Start offset of the segment in UTF-16 index. 33 // Start offset of the segment in UTF-16 index.
34 uint32 start_offset; 34 uint32 start_offset;
35 // End offset of the segment in UTF-16 index. 35 // End offset of the segment in UTF-16 index.
36 uint32 end_offset; 36 uint32 end_offset;
37 // Indicates that this segment should be emphasized. 37 // Indicates that this segment should be emphasized.
38 bool emphasized; 38 bool emphasized;
39 }; 39 };
40 40
41 // Next MinVersion: 3
41 interface ImeHost { 42 interface ImeHost {
42 // Notifies Chrome that the text input focus is changed. 43 // Notifies Chrome that the text input focus is changed.
43 OnTextInputTypeChanged(TextInputType type); 44 OnTextInputTypeChanged(TextInputType type);
44 45
45 // Notifies Chrome that the cursor poisition has changed. 46 // Notifies Chrome that the cursor poisition has changed.
46 OnCursorRectChanged(CursorRect rect); 47 OnCursorRectChanged(CursorRect rect);
47 48
48 // Notifies Chrome that the current composition is canceled. 49 // Notifies Chrome that the current composition is canceled.
49 [MinVersion=1] OnCancelComposition(); 50 [MinVersion=1] OnCancelComposition();
51
52 // Show virtual keyboard of Chrome OS if needed.
53 [MinVersion=2] ShowImeIfNeeded();
50 }; 54 };
51 55
52 interface ImeInstance { 56 interface ImeInstance {
53 Init(ImeHost host_ptr); 57 Init(ImeHost host_ptr);
54 58
55 // Sets composition text and attributes requested by the host IME. 59 // Sets composition text and attributes requested by the host IME.
56 SetCompositionText(string text, array<CompositionSegment> segments); 60 SetCompositionText(string text, array<CompositionSegment> segments);
57 61
58 // Commits the last set composition text and clears the composition. 62 // Commits the last set composition text and clears the composition.
59 ConfirmCompositionText(); 63 ConfirmCompositionText();
60 64
61 // Commits the specified text and clears the composition. 65 // Commits the specified text and clears the composition.
62 InsertText(string text); 66 InsertText(string text);
63 }; 67 };
OLDNEW
« no previous file with comments | « no previous file | components/arc/ime/arc_ime_bridge.h » ('j') | components/arc/ime/arc_ime_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698