Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 2697403003: DevTools: "Delete File" in navigator should actually delete a file (Closed)
Patch Set: address comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 UI.endBatchUpdate(); 608 UI.endBatchUpdate();
609 } 609 }
610 } 610 }
611 611
612 /** 612 /**
613 * @param {!Workspace.UISourceCode} uiSourceCode 613 * @param {!Workspace.UISourceCode} uiSourceCode
614 */ 614 */
615 _handleContextMenuDelete(uiSourceCode) { 615 _handleContextMenuDelete(uiSourceCode) {
616 var shouldDelete = window.confirm(Common.UIString('Are you sure you want to delete this file?')); 616 var shouldDelete = window.confirm(Common.UIString('Are you sure you want to delete this file?'));
617 if (shouldDelete) 617 if (shouldDelete)
618 uiSourceCode.project().deleteFile(uiSourceCode.url()); 618 uiSourceCode.project().deleteFile(uiSourceCode);
619 } 619 }
620 620
621 /** 621 /**
622 * @param {!Event} event 622 * @param {!Event} event
623 * @param {!Sources.NavigatorUISourceCodeTreeNode} node 623 * @param {!Sources.NavigatorUISourceCodeTreeNode} node
624 */ 624 */
625 handleFileContextMenu(event, node) { 625 handleFileContextMenu(event, node) {
626 var uiSourceCode = node.uiSourceCode(); 626 var uiSourceCode = node.uiSourceCode();
627 var contextMenu = new UI.ContextMenu(event); 627 var contextMenu = new UI.ContextMenu(event);
628 contextMenu.appendApplicableItems(uiSourceCode); 628 contextMenu.appendApplicableItems(uiSourceCode);
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 /** 1612 /**
1613 * @param {string} title 1613 * @param {string} title
1614 * @override 1614 * @override
1615 */ 1615 */
1616 setTitle(title) { 1616 setTitle(title) {
1617 this._title = title; 1617 this._title = title;
1618 if (this._treeElement) 1618 if (this._treeElement)
1619 this._treeElement.title = this._title; 1619 this._treeElement.title = this._title;
1620 } 1620 }
1621 }; 1621 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698