| 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.FilteredUISourceCodeListDelegate} | 9 * @extends {WebInspector.FilteredUISourceCodeListDelegate} |
| 10 * @param {!WebInspector.SourcesView} sourcesView | 10 * @param {!WebInspector.SourcesView} sourcesView |
| 11 * @param {!Map.<!WebInspector.UISourceCode, number>} defaultScores | 11 * @param {!Map.<!WebInspector.UISourceCode, number>} defaultScores |
| 12 * @param {!Array<string>} history | 12 * @param {!Array<string>} history |
| 13 */ | 13 */ |
| 14 WebInspector.OpenResourceDialog = function(sourcesView, defaultScores, history) | 14 WebInspector.OpenResourceDialog = function(sourcesView, defaultScores, history) |
| 15 { | 15 { |
| 16 WebInspector.FilteredUISourceCodeListDelegate.call(this, defaultScores, hist
ory); | 16 WebInspector.FilteredUISourceCodeListDelegate.call(this, defaultScores, hist
ory); |
| 17 this._sourcesView = sourcesView; | 17 this._sourcesView = sourcesView; |
| 18 } | 18 }; |
| 19 | 19 |
| 20 WebInspector.OpenResourceDialog.prototype = { | 20 WebInspector.OpenResourceDialog.prototype = { |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * @override | 23 * @override |
| 24 * @param {?WebInspector.UISourceCode} uiSourceCode | 24 * @param {?WebInspector.UISourceCode} uiSourceCode |
| 25 * @param {number=} lineNumber | 25 * @param {number=} lineNumber |
| 26 * @param {number=} columnNumber | 26 * @param {number=} columnNumber |
| 27 */ | 27 */ |
| 28 uiSourceCodeSelected: function(uiSourceCode, lineNumber, columnNumber) | 28 uiSourceCodeSelected: function(uiSourceCode, lineNumber, columnNumber) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 57 /** | 57 /** |
| 58 * @override | 58 * @override |
| 59 * @return {boolean} | 59 * @return {boolean} |
| 60 */ | 60 */ |
| 61 renderAsTwoRows: function() | 61 renderAsTwoRows: function() |
| 62 { | 62 { |
| 63 return true; | 63 return true; |
| 64 }, | 64 }, |
| 65 | 65 |
| 66 __proto__: WebInspector.FilteredUISourceCodeListDelegate.prototype | 66 __proto__: WebInspector.FilteredUISourceCodeListDelegate.prototype |
| 67 } | 67 }; |
| 68 | 68 |
| 69 /** | 69 /** |
| 70 * @param {!WebInspector.SourcesView} sourcesView | 70 * @param {!WebInspector.SourcesView} sourcesView |
| 71 * @param {string} query | 71 * @param {string} query |
| 72 * @param {!Map.<!WebInspector.UISourceCode, number>} defaultScores | 72 * @param {!Map.<!WebInspector.UISourceCode, number>} defaultScores |
| 73 * @param {!Array<string>} history | 73 * @param {!Array<string>} history |
| 74 */ | 74 */ |
| 75 WebInspector.OpenResourceDialog.show = function(sourcesView, query, defaultScore
s, history) | 75 WebInspector.OpenResourceDialog.show = function(sourcesView, query, defaultScore
s, history) |
| 76 { | 76 { |
| 77 WebInspector.OpenResourceDialog._instanceForTest = new WebInspector.OpenReso
urceDialog(sourcesView, defaultScores, history); | 77 WebInspector.OpenResourceDialog._instanceForTest = new WebInspector.OpenReso
urceDialog(sourcesView, defaultScores, history); |
| 78 var filteredItemSelectionDialog = new WebInspector.FilteredListWidget(WebIns
pector.OpenResourceDialog._instanceForTest); | 78 var filteredItemSelectionDialog = new WebInspector.FilteredListWidget(WebIns
pector.OpenResourceDialog._instanceForTest); |
| 79 filteredItemSelectionDialog.showAsDialog(); | 79 filteredItemSelectionDialog.showAsDialog(); |
| 80 filteredItemSelectionDialog.setQuery(query); | 80 filteredItemSelectionDialog.setQuery(query); |
| 81 } | 81 }; |
| 82 | 82 |
| 83 /** | 83 /** |
| 84 * @constructor | 84 * @constructor |
| 85 * @extends {WebInspector.FilteredUISourceCodeListDelegate} | 85 * @extends {WebInspector.FilteredUISourceCodeListDelegate} |
| 86 * @param {!Array.<string>} types | 86 * @param {!Array.<string>} types |
| 87 * @param {function(?WebInspector.UISourceCode)} callback | 87 * @param {function(?WebInspector.UISourceCode)} callback |
| 88 */ | 88 */ |
| 89 WebInspector.SelectUISourceCodeForProjectTypesDialog = function(types, callback) | 89 WebInspector.SelectUISourceCodeForProjectTypesDialog = function(types, callback) |
| 90 { | 90 { |
| 91 this._types = types; | 91 this._types = types; |
| 92 WebInspector.FilteredUISourceCodeListDelegate.call(this); | 92 WebInspector.FilteredUISourceCodeListDelegate.call(this); |
| 93 this._callback = callback; | 93 this._callback = callback; |
| 94 } | 94 }; |
| 95 | 95 |
| 96 WebInspector.SelectUISourceCodeForProjectTypesDialog.prototype = { | 96 WebInspector.SelectUISourceCodeForProjectTypesDialog.prototype = { |
| 97 /** | 97 /** |
| 98 * @override | 98 * @override |
| 99 * @param {?WebInspector.UISourceCode} uiSourceCode | 99 * @param {?WebInspector.UISourceCode} uiSourceCode |
| 100 * @param {number=} lineNumber | 100 * @param {number=} lineNumber |
| 101 * @param {number=} columnNumber | 101 * @param {number=} columnNumber |
| 102 */ | 102 */ |
| 103 uiSourceCodeSelected: function(uiSourceCode, lineNumber, columnNumber) | 103 uiSourceCodeSelected: function(uiSourceCode, lineNumber, columnNumber) |
| 104 { | 104 { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 118 /** | 118 /** |
| 119 * @override | 119 * @override |
| 120 * @return {boolean} | 120 * @return {boolean} |
| 121 */ | 121 */ |
| 122 renderAsTwoRows: function() | 122 renderAsTwoRows: function() |
| 123 { | 123 { |
| 124 return true; | 124 return true; |
| 125 }, | 125 }, |
| 126 | 126 |
| 127 __proto__: WebInspector.FilteredUISourceCodeListDelegate.prototype | 127 __proto__: WebInspector.FilteredUISourceCodeListDelegate.prototype |
| 128 } | 128 }; |
| 129 | 129 |
| 130 /** | 130 /** |
| 131 * @param {string} name | 131 * @param {string} name |
| 132 * @param {!Array.<string>} types | 132 * @param {!Array.<string>} types |
| 133 * @param {function(?WebInspector.UISourceCode)} callback | 133 * @param {function(?WebInspector.UISourceCode)} callback |
| 134 */ | 134 */ |
| 135 WebInspector.SelectUISourceCodeForProjectTypesDialog.show = function(name, types
, callback) | 135 WebInspector.SelectUISourceCodeForProjectTypesDialog.show = function(name, types
, callback) |
| 136 { | 136 { |
| 137 var filteredItemSelectionDialog = new WebInspector.FilteredListWidget(new We
bInspector.SelectUISourceCodeForProjectTypesDialog(types, callback)); | 137 var filteredItemSelectionDialog = new WebInspector.FilteredListWidget(new We
bInspector.SelectUISourceCodeForProjectTypesDialog(types, callback)); |
| 138 filteredItemSelectionDialog.showAsDialog(); | 138 filteredItemSelectionDialog.showAsDialog(); |
| 139 filteredItemSelectionDialog.setQuery(name); | 139 filteredItemSelectionDialog.setQuery(name); |
| 140 } | 140 }; |
| OLD | NEW |