| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @constructor | 8 * @constructor |
| 9 * @extends {WebInspector.FilteredListWidget.Delegate} | 9 * @extends {WebInspector.FilteredListWidget.Delegate} |
| 10 * @param {!WebInspector.UISourceCode} uiSourceCode | 10 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 11 * @param {function(number, number)} selectItemCallback | 11 * @param {function(number, number)} selectItemCallback |
| 12 */ | 12 */ |
| 13 WebInspector.JavaScriptOutlineDialog = function(uiSourceCode, selectItemCallback
) | 13 WebInspector.JavaScriptOutlineDialog = function(uiSourceCode, selectItemCallback
) |
| 14 { | 14 { |
| 15 WebInspector.FilteredListWidget.Delegate.call(this, []); | 15 WebInspector.FilteredListWidget.Delegate.call(this, []); |
| 16 | 16 |
| 17 this._functionItems = []; | 17 this._functionItems = []; |
| 18 this._selectItemCallback = selectItemCallback; | 18 this._selectItemCallback = selectItemCallback; |
| 19 this._outlineWorker = new WorkerRuntime.Worker("script_formatter_worker"); | 19 this._outlineWorker = new WorkerRuntime.Worker("formatter_worker"); |
| 20 this._outlineWorker.onmessage = this._didBuildOutlineChunk.bind(this); | 20 this._outlineWorker.onmessage = this._didBuildOutlineChunk.bind(this); |
| 21 this._outlineWorker.postMessage({ method: "javaScriptOutline", params: { con
tent: uiSourceCode.workingCopy() } }); | 21 this._outlineWorker.postMessage({ method: "javaScriptOutline", params: { con
tent: uiSourceCode.workingCopy() } }); |
| 22 } | 22 } |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * @param {!WebInspector.UISourceCode} uiSourceCode | 25 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 26 * @param {function(number, number)} selectItemCallback | 26 * @param {function(number, number)} selectItemCallback |
| 27 */ | 27 */ |
| 28 WebInspector.JavaScriptOutlineDialog.show = function(uiSourceCode, selectItemCal
lback) | 28 WebInspector.JavaScriptOutlineDialog.show = function(uiSourceCode, selectItemCal
lback) |
| 29 { | 29 { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 }, | 117 }, |
| 118 | 118 |
| 119 __proto__: WebInspector.FilteredListWidget.Delegate.prototype | 119 __proto__: WebInspector.FilteredListWidget.Delegate.prototype |
| 120 } | 120 } |
| 121 | 121 |
| 122 /** | 122 /** |
| 123 * @typedef {{isLastChunk: boolean, chunk: !Array.<!{selectorText: string, lineN
umber: number, columnNumber: number}>}} | 123 * @typedef {{isLastChunk: boolean, chunk: !Array.<!{selectorText: string, lineN
umber: number, columnNumber: number}>}} |
| 124 */ | 124 */ |
| 125 WebInspector.JavaScriptOutlineDialog.MessageEventData; | 125 WebInspector.JavaScriptOutlineDialog.MessageEventData; |
| OLD | NEW |