OLD | NEW |
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 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.Widget} | 7 * @extends {WebInspector.Widget} |
8 */ | 8 */ |
9 WebInspector.ConsolePrompt = function() | 9 WebInspector.ConsolePrompt = function() |
10 { | 10 { |
(...skipping 30 matching lines...) Expand all Loading... |
41 this._editor.widget().show(this.element); | 41 this._editor.widget().show(this.element); |
42 | 42 |
43 this.setText(this._initialText); | 43 this.setText(this._initialText); |
44 delete this._initialText; | 44 delete this._initialText; |
45 if (this.hasFocus()) | 45 if (this.hasFocus()) |
46 this.focus(); | 46 this.focus(); |
47 this.element.tabIndex = -1; | 47 this.element.tabIndex = -1; |
48 | 48 |
49 this._editorSetForTest(); | 49 this._editorSetForTest(); |
50 } | 50 } |
51 } | 51 }; |
52 | 52 |
53 WebInspector.ConsolePrompt.prototype = { | 53 WebInspector.ConsolePrompt.prototype = { |
54 /** | 54 /** |
55 * @return {!WebInspector.HistoryManager} | 55 * @return {!WebInspector.HistoryManager} |
56 */ | 56 */ |
57 history: function() | 57 history: function() |
58 { | 58 { |
59 return this._history; | 59 return this._history; |
60 }, | 60 }, |
61 | 61 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 */ | 284 */ |
285 function innerWordsWithPrefix(words) | 285 function innerWordsWithPrefix(words) |
286 { | 286 { |
287 fulfill(words.map(item => ({title:item})).concat(historyWords)); | 287 fulfill(words.map(item => ({title:item})).concat(historyWords)); |
288 } | 288 } |
289 }, | 289 }, |
290 | 290 |
291 _editorSetForTest: function() { }, | 291 _editorSetForTest: function() { }, |
292 | 292 |
293 __proto__: WebInspector.Widget.prototype | 293 __proto__: WebInspector.Widget.prototype |
294 } | 294 }; |
OLD | NEW |