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

Side by Side Diff: content/common/input/input_handler.mojom

Issue 2884243003: Add a mojo channel for frame messages. (Closed)
Patch Set: Fix presubmit warning I ignored Created 3 years, 7 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 | « content/common/input/OWNERS ('k') | content/public/app/mojo/content_renderer_manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module content.mojom;
6
7 import "mojo/common/string16.mojom";
8 import "services/ui/public/interfaces/ime/ime.mojom";
9 import "ui/gfx/geometry/mojo/geometry.mojom";
10
11 interface WidgetInputHandler {
12 // TODO(dtapuska): Implement me.
13 };
14
15 // This interface provides the input actions associated with the RenderFrame.
16 // Other input actions may also be dispatched via the WidgetInputHandler
17 // interface. If frame input actions are dispatched the WidgetInputHandler
18 // should be fetched via the associated interface request so that input calls
19 // remain in order. See https://goo.gl/x4ee8A for more details.
20 interface FrameInputHandler {
21 // Sets the text composition to be between the given start and end offsets in
22 // the currently focused editable field.
23 SetCompositionFromExistingText(
24 int32 start, int32 end, array<ui.mojom.CompositionUnderline> underlines);
25
26 // Deletes the current selection plus the specified number of characters
27 // before and after the selection or caret.
28 ExtendSelectionAndDelete(int32 before, int32 after);
29
30 // Deletes text before and after the current cursor position, excluding the
31 // selection. The lengths are supplied in Java chars (UTF-16 Code Unit),
32 // not in code points or in glyphs.
33 DeleteSurroundingText(int32 before, int32 after);
34
35 // Deletes text before and after the current cursor position, excluding the
36 // selection. The lengths are supplied in code points, not in Java chars
37 // (UTF-16 Code Unit) or in glyphs. Does nothing if there are one or more
38 // invalid surrogate pairs in the requested range
39 DeleteSurroundingTextInCodePoints(int32 before, int32 after);
40
41 // Selects between the given start and end offsets in the currently focused
42 // editable field.
43 SetEditableSelectionOffsets(int32 start, int32 end);
44
45 // Message payload is the name/value of a WebCore edit command to execute.
46 ExecuteEditCommand(string command, mojo.common.mojom.String16? value);
47
48 // These messages are typically generated from context menus and request the
49 // renderer to apply the specified operation to the current selection.
50 Undo();
51 Redo();
52 Cut();
53 Copy();
54 CopyToFindPboard();
55 Paste();
56 PasteAndMatchStyle();
57 Delete();
58 SelectAll();
59 CollapseSelection();
60
61 // Replaces the selected region or a word around the cursor with the
62 // specified string.
63 Replace(mojo.common.mojom.String16 word);
64
65 // Replaces the misspelling in the selected region with the specified string.
66 ReplaceMisspelling(mojo.common.mojom.String16 word);
67
68 // Requests the renderer to select the region between two points.
69 // Expects a SelectRange_ACK message when finished.
70 SelectRange(gfx.mojom.Point base, gfx.mojom.Point extent);
71
72 // Sent by the browser to ask the renderer to adjust the selection start and
73 // end points by the given amounts. A negative amount moves the selection
74 // towards the beginning of the document, a positive amount moves the
75 // selection towards the end of the document.
76 AdjustSelectionByCharacterOffset(int32 start, int32 end);
77
78 // Requests the renderer to move the selection extent point to a new position.
79 // Expects a MoveRangeSelectionExtent_ACK message when finished.
80 MoveRangeSelectionExtent(gfx.mojom.Point extent);
81
82 // TODO(dtapuska): Implement WidgetInputHandler.
83 // GetWidgetInputHandler(associated WidgetInputHandler& interface_request);
84 };
OLDNEW
« no previous file with comments | « content/common/input/OWNERS ('k') | content/public/app/mojo/content_renderer_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698