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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js

Issue 2778873003: DevTools: Convert TextEditor from Interface to Abstract class (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js ('k') | no next file » | 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 * @interface 5 * @interface
6 */ 6 */
7 UI.TextEditorFactory = function() {}; 7 UI.TextEditorFactory = function() {};
8 8
9 UI.TextEditorFactory.prototype = { 9 UI.TextEditorFactory.prototype = {
10 /** 10 /**
11 * @param {!UI.TextEditor.Options} options 11 * @param {!UI.TextEditor.Options} options
12 * @return {!UI.TextEditor} 12 * @return {!UI.TextEditor}
13 */ 13 */
14 createEditor(options) {} 14 createEditor(options) {}
15 }; 15 };
16 16
17 /** 17 /**
18 * @interface 18 * @abstract
19 * @unrestricted
19 */ 20 */
20 UI.TextEditor = function() {}; 21 UI.TextEditor = class extends UI.Widget {
21
22 UI.TextEditor.prototype = {
23
24 /** 22 /**
25 * @return {!UI.Widget} 23 * @return {!Common.TextRange}
26 */ 24 */
27 widget() {}, 25 fullRange() {
26 }
28 27
29 /** 28 /**
30 * @return {!Common.TextRange} 29 * @return {!Common.TextRange}
31 */ 30 */
32 fullRange() {}, 31 selection() {
33 32 }
34 /**
35 * @return {!Common.TextRange}
36 */
37 selection() {},
38 33
39 /** 34 /**
40 * @param {!Common.TextRange} selection 35 * @param {!Common.TextRange} selection
41 */ 36 */
42 setSelection(selection) {}, 37 setSelection(selection) {
38 }
43 39
44 /** 40 /**
45 * @param {!Common.TextRange=} textRange 41 * @param {!Common.TextRange=} textRange
46 * @return {string} 42 * @return {string}
47 */ 43 */
48 text(textRange) {}, 44 text(textRange) {
45 }
49 46
50 /** 47 /**
51 * @param {string} text 48 * @param {string} text
52 */ 49 */
53 setText(text) {}, 50 setText(text) {
51 }
54 52
55 /** 53 /**
56 * @param {number} lineNumber 54 * @param {number} lineNumber
57 * @return {string} 55 * @return {string}
58 */ 56 */
59 line(lineNumber) {}, 57 line(lineNumber) {
58 }
60 59
61 newlineAndIndent() {}, 60 newlineAndIndent() {
61 }
62 62
63 /** 63 /**
64 * @param {function(!KeyboardEvent)} handler 64 * @param {function(!KeyboardEvent)} handler
65 */ 65 */
66 addKeyDownHandler(handler) {}, 66 addKeyDownHandler(handler) {
67 }
67 68
68 /** 69 /**
69 * @param {?UI.AutocompleteConfig} config 70 * @param {?UI.AutocompleteConfig} config
70 */ 71 */
71 configureAutocomplete(config) {}, 72 configureAutocomplete(config) {
73 }
72 74
73 clearAutocomplete() {} 75 clearAutocomplete() {}
74 }; 76 };
75 77
76 /** 78 /**
77 * @typedef {{ 79 * @typedef {{
78 * bracketMatchingSetting: (!Common.Setting|undefined), 80 * bracketMatchingSetting: (!Common.Setting|undefined),
79 * lineNumbers: boolean, 81 * lineNumbers: boolean,
80 * lineWrapping: boolean, 82 * lineWrapping: boolean,
81 * mimeType: (string|undefined), 83 * mimeType: (string|undefined),
82 * autoHeight: (boolean|undefined), 84 * autoHeight: (boolean|undefined),
83 * padBottom: (boolean|undefined) 85 * padBottom: (boolean|undefined)
84 * }} 86 * }}
85 */ 87 */
86 UI.TextEditor.Options; 88 UI.TextEditor.Options;
87 89
88 /** 90 /**
89 * @typedef {{ 91 * @typedef {{
90 * substituteRangeCallback: ((function(number, number):?Common.TextRange)|un defined), 92 * substituteRangeCallback: ((function(number, number):?Common.TextRange)|un defined),
91 * suggestionsCallback: ((function(!Common.TextRange, !Common.TextRange, boo lean=, string=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined), 93 * suggestionsCallback: ((function(!Common.TextRange, !Common.TextRange, boo lean=, string=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined),
92 * isWordChar: ((function(string):boolean)|undefined), 94 * isWordChar: ((function(string):boolean)|undefined),
93 * captureEnter: (boolean|undefined) 95 * captureEnter: (boolean|undefined)
94 * }} 96 * }}
95 */ 97 */
96 UI.AutocompleteConfig; 98 UI.AutocompleteConfig;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698