Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 { | |
| 13 // TODO(dtapuska): Implement me. | |
| 14 }; | |
| 15 | |
| 16 // This interface provides the input actions associated with the RenderFrame. | |
| 17 // Other input actions may also be dispatched via the WidgetInputHandler | |
| 18 // interface. If frame input actions are dispatched the WidgetInputHandler | |
| 19 // should be fetched via the associated interface request so that input calls | |
| 20 // remain in order. See https://goo.gl/x4ee8A for more details. | |
| 21 interface FrameInputHandler | |
| 22 { | |
| 23 // Sets the text composition to be between the given start and end offsets in | |
| 24 // the currently focused editable field. | |
| 25 SetCompositionFromExistingText(int32 start, int32 end, array<ui.mojom.Composit ionUnderline> underlines); | |
|
dcheng
2017/05/25 00:03:58
Nit: 80 chars
dtapuska
2017/05/26 14:02:06
Done. Although git cl format doesn't clang format
| |
| 26 | |
| 27 // Deletes the current selection plus the specified number of characters | |
| 28 // before and after the selection or caret. | |
| 29 ExtendSelectionAndDelete(int32 before, int32 after); | |
| 30 | |
| 31 // Deletes text before and after the current cursor position, excluding the | |
| 32 // selection. The lengths are supplied in Java chars (UTF-16 Code Unit), | |
| 33 // not in code points or in glyphs. | |
| 34 DeleteSurroundingText(int32 before, int32 after); | |
| 35 | |
| 36 // Deletes text before and after the current cursor position, excluding the | |
| 37 // selection. The lengths are supplied in code points, not in Java chars | |
| 38 // (UTF-16 Code Unit) or in glyphs. Does nothing if there are one or more | |
| 39 // invalid surrogate pairs in the requested range | |
| 40 DeleteSurroundingTextInCodePoints(int32 before, int32 after); | |
| 41 | |
| 42 // Selects between the given start and end offsets in the currently focused | |
| 43 // editable field. | |
| 44 SetEditableSelectionOffsets(int32 start, int32 end); | |
| 45 | |
| 46 // Message payload is the name/value of a WebCore edit command to execute. | |
| 47 ExecuteEditCommand(string command, mojo.common.mojom.String16? value); | |
| 48 | |
| 49 // These messages are typically generated from context menus and request the | |
| 50 // renderer to apply the specified operation to the current selection. | |
| 51 Undo(); | |
| 52 Redo(); | |
| 53 Cut(); | |
| 54 Copy(); | |
| 55 CopyToFindPboard(); | |
| 56 Paste(); | |
| 57 PasteAndMatchStyle(); | |
| 58 Delete(); | |
| 59 SelectAll(); | |
| 60 CollapseSelection(); | |
| 61 | |
| 62 // Replaces the selected region or a word around the cursor with the | |
| 63 // specified string. | |
| 64 Replace(mojo.common.mojom.String16 word); | |
| 65 | |
| 66 // Replaces the misspelling in the selected region with the specified string. | |
| 67 ReplaceMisspelling(mojo.common.mojom.String16 word); | |
| 68 | |
| 69 // Requests the renderer to select the region between two points. | |
| 70 // Expects a SelectRange_ACK message when finished. | |
| 71 SelectRange(gfx.mojom.Point base, gfx.mojom.Point extent); | |
| 72 | |
| 73 // Sent by the browser to ask the renderer to adjust the selection start and | |
| 74 // end points by the given amounts. A negative amount moves the selection | |
| 75 // towards the beginning of the document, a positive amount moves the | |
| 76 // selection towards the end of the document. | |
| 77 AdjustSelectionByCharacterOffset(int32 start, int32 end); | |
| 78 | |
| 79 // Requests the renderer to move the selection extent point to a new position. | |
| 80 // Expects a MoveRangeSelectionExtent_ACK message when finished. | |
| 81 MoveRangeSelectionExtent(gfx.mojom.Point extent); | |
| 82 | |
| 83 // TODO(dtapuska): Implement WidgetInputHandler. | |
| 84 // GetWidgetInputHandler(associated WidgetInputHandler& interface_request); | |
| 85 }; | |
| OLD | NEW |