| 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 */ | 7 */ |
| 8 WebInspector.CommandMenu = function() | 8 WebInspector.CommandMenu = function() |
| 9 { | 9 { |
| 10 this._commands = []; | 10 this._commands = []; |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 WebInspector.inspectorView.panel(panelName).then(WebInspector.inspectorV
iew.setCurrentPanel.bind(WebInspector.inspectorView)); | 325 WebInspector.inspectorView.panel(panelName).then(WebInspector.inspectorV
iew.setCurrentPanel.bind(WebInspector.inspectorView)); |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 | 328 |
| 329 /** | 329 /** |
| 330 * @param {!Runtime.Extension} extension | 330 * @param {!Runtime.Extension} extension |
| 331 * @return {!WebInspector.CommandMenu.Command} | 331 * @return {!WebInspector.CommandMenu.Command} |
| 332 */ | 332 */ |
| 333 WebInspector.CommandMenu.createRevealDrawerCommand = function(extension) | 333 WebInspector.CommandMenu.createRevealDrawerCommand = function(extension) |
| 334 { | 334 { |
| 335 var drawerId = extension.descriptor()["name"]; | 335 var drawerId = extension.descriptor()["id"]; |
| 336 var executeHandler = WebInspector.inspectorView.showViewInDrawer.bind(WebIns
pector.inspectorView, drawerId); | 336 var executeHandler = WebInspector.viewManager.showView.bind(WebInspector.vie
wManager, drawerId); |
| 337 var tags = extension.descriptor()["tags"] || ""; | 337 var tags = extension.descriptor()["tags"] || ""; |
| 338 return WebInspector.CommandMenu.createCommand(WebInspector.UIString("Drawer"
), tags, WebInspector.UIString("Show %s", extension.title()), "", executeHandler
); | 338 return WebInspector.CommandMenu.createCommand(WebInspector.UIString("Drawer"
), tags, WebInspector.UIString("Show %s", extension.title()), "", executeHandler
); |
| 339 } | 339 } |
| 340 | 340 |
| 341 /** @type {!WebInspector.CommandMenu} */ | 341 /** @type {!WebInspector.CommandMenu} */ |
| 342 WebInspector.commandMenu = new WebInspector.CommandMenu(); | 342 WebInspector.commandMenu = new WebInspector.CommandMenu(); |
| 343 | 343 |
| 344 /** | 344 /** |
| 345 * @constructor | 345 * @constructor |
| 346 * @implements {WebInspector.ActionDelegate} | 346 * @implements {WebInspector.ActionDelegate} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 357 * @return {boolean} | 357 * @return {boolean} |
| 358 */ | 358 */ |
| 359 handleAction: function(context, actionId) | 359 handleAction: function(context, actionId) |
| 360 { | 360 { |
| 361 new WebInspector.FilteredListWidget(new WebInspector.CommandMenuDelegate
()).showAsDialog(); | 361 new WebInspector.FilteredListWidget(new WebInspector.CommandMenuDelegate
()).showAsDialog(); |
| 362 InspectorFrontendHost.bringToFront(); | 362 InspectorFrontendHost.bringToFront(); |
| 363 return true; | 363 return true; |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 | 366 |
| OLD | NEW |