Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 487 if (project.type() === WebInspector.projectTypes.FileSystem) { | 487 if (project.type() === WebInspector.projectTypes.FileSystem) { |
| 488 var path = uiSourceCode.parentPath(); | 488 var path = uiSourceCode.parentPath(); |
| 489 contextMenu.appendItem(WebInspector.UIString.capitalize("Rename\u202 6"), this._handleContextMenuRename.bind(this, uiSourceCode)); | 489 contextMenu.appendItem(WebInspector.UIString.capitalize("Rename\u202 6"), this._handleContextMenuRename.bind(this, uiSourceCode)); |
| 490 contextMenu.appendItem(WebInspector.UIString.capitalize("Make a ^cop y\u2026"), this._handleContextMenuCreate.bind(this, project, path, uiSourceCode) ); | 490 contextMenu.appendItem(WebInspector.UIString.capitalize("Make a ^cop y\u2026"), this._handleContextMenuCreate.bind(this, project, path, uiSourceCode) ); |
| 491 contextMenu.appendItem(WebInspector.UIString.capitalize("Delete"), t his._handleContextMenuDelete.bind(this, uiSourceCode)); | 491 contextMenu.appendItem(WebInspector.UIString.capitalize("Delete"), t his._handleContextMenuDelete.bind(this, uiSourceCode)); |
| 492 contextMenu.appendSeparator(); | 492 contextMenu.appendSeparator(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 contextMenu.show(); | 495 contextMenu.show(); |
| 496 }, | 496 }, |
| 497 | 497 _openAppBanner: function(agent) |
| 498 { | |
| 499 agent.openAppBanner(); | |
| 500 }, | |
| 498 /** | 501 /** |
| 499 * @param {!Event} event | 502 * @param {!Event} event |
| 500 * @param {!WebInspector.NavigatorFolderTreeNode} node | 503 * @param {!WebInspector.NavigatorFolderTreeNode} node |
| 501 */ | 504 */ |
| 502 handleFolderContextMenu: function(event, node) | 505 handleFolderContextMenu: function(event, node) |
| 503 { | 506 { |
| 504 var path = node._folderPath; | 507 var path = node._folderPath; |
| 505 var project = node._project; | 508 var project = node._project; |
| 506 | 509 |
| 507 var contextMenu = new WebInspector.ContextMenu(event); | 510 var contextMenu = new WebInspector.ContextMenu(event); |
| 508 | 511 if (node.parent.isRoot()) { |
| 512 var target = WebInspector.NetworkProject.targetForProject(project); | |
| 513 if (target.isPage()) { | |
| 514 contextMenu.appendItem(WebInspector.UIString.capitalize("Open app ba nner"), this._openAppBanner.bind(this, target.pageAgent())); | |
|
pfeldman
2016/01/14 04:43:05
I think this item should go into the device mode t
horo
2016/01/15 10:00:22
Implemented in DeviceModeView.
But I think DeviceM
| |
| 515 } | |
| 516 } | |
| 509 if (project && project.type() === WebInspector.projectTypes.FileSystem) { | 517 if (project && project.type() === WebInspector.projectTypes.FileSystem) { |
| 510 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"), this._handleContextMenuRefresh.bind(this, project, path)); | 518 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"), this._handleContextMenuRefresh.bind(this, project, path)); |
| 511 if (node instanceof WebInspector.NavigatorFolderTreeNode) { | 519 if (node instanceof WebInspector.NavigatorFolderTreeNode) { |
| 512 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^fi le"), this._handleContextMenuCreate.bind(this, project, path)); | 520 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^fi le"), this._handleContextMenuCreate.bind(this, project, path)); |
| 513 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude ^folder"), this._handleContextMenuExclude.bind(this, project, path)); | 521 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude ^folder"), this._handleContextMenuExclude.bind(this, project, path)); |
| 514 } | 522 } |
| 515 } | 523 } |
| 516 contextMenu.appendSeparator(); | 524 contextMenu.appendSeparator(); |
| 517 WebInspector.NavigatorView.appendAddFolderItem(contextMenu); | 525 WebInspector.NavigatorView.appendAddFolderItem(contextMenu); |
| 518 | 526 |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1481 { | 1489 { |
| 1482 if (this._treeElement) | 1490 if (this._treeElement) |
| 1483 return this._treeElement; | 1491 return this._treeElement; |
| 1484 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title); | 1492 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title); |
| 1485 this._treeElement.setNode(this); | 1493 this._treeElement.setNode(this); |
| 1486 return this._treeElement; | 1494 return this._treeElement; |
| 1487 }, | 1495 }, |
| 1488 | 1496 |
| 1489 __proto__: WebInspector.NavigatorTreeNode.prototype | 1497 __proto__: WebInspector.NavigatorTreeNode.prototype |
| 1490 } | 1498 } |
| OLD | NEW |