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

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

Issue 2281703002: DevTools: Create TextEditor Interface around CodeMirrorTextEditor (Closed)
Patch Set: Remove accidental devtools.gypi 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js b/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js
new file mode 100644
index 0000000000000000000000000000000000000000..d05df07f0adb0eb76e06e18687983f0398af8b53
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js
@@ -0,0 +1,92 @@
+/**
+ * @interface
+ */
+WebInspector.TextEditorFactory = function()
+{
+}
+
+WebInspector.TextEditorFactory.prototype = {
+ /**
+ * @param {!WebInspector.TextEditor.Options} options
+ * @return {!WebInspector.TextEditor}
+ */
+ createEditor: function(options) { }
+}
+
+/**
+ * @interface
+ */
+WebInspector.TextEditor = function()
+{
+}
+
+WebInspector.TextEditor.prototype = {
+
+ /**
+ * @return {!WebInspector.Widget}
+ */
+ widget: function() { },
+
+ /**
+ * @return {!WebInspector.TextRange}
+ */
+ fullRange: function(){ },
+
+ /**
+ * @return {!WebInspector.TextRange}
+ */
+ selection: function() { },
+
+ /**
+ * @param {!WebInspector.TextRange} selection
+ */
+ setSelection: function(selection) { },
+
+ /**
+ * @param {!WebInspector.TextRange=} textRange
+ * @return {string}
+ */
+ text: function(textRange) { },
+
+ /**
+ * @param {string} text
+ */
+ setText: function(text) { },
+
+ /**
+ * @param {number} lineNumber
+ * @return {string}
+ */
+ line: function(lineNumber) { },
+
+ /**
+ * @param {function(!KeyboardEvent)} handler
+ */
+ addKeyDownHandler: function(handler) { },
+
+ /**
+ * @param {?WebInspector.AutocompleteConfig} config
+ */
+ configureAutocomplete: function(config) { },
+
+ clearAutocomplete: function() { }
+}
+
+/**
+ * @typedef {{
+ * bracketMatchingSetting: (!WebInspector.Setting|undefined),
+ * lineNumbers: boolean,
+ * lineWrapping: boolean,
+ * mimeType: (string|undefined)
+ * }}
+ **/
+WebInspector.TextEditor.Options;
+
+/**
+ * @typedef {{
+ * substituteRangeCallback: ((function(number, number):?WebInspector.TextRange)|undefined),
+ * suggestionsCallback: ((function(!WebInspector.TextRange, !WebInspector.TextRange):?Promise.<!WebInspector.SuggestBox.Suggestions>)|undefined),
+ * isWordChar: ((function(string):boolean)|undefined)
+ * }}
+ **/
+WebInspector.AutocompleteConfig;

Powered by Google App Engine
This is Rietveld 408576698