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

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

Issue 2859533004: DevTools: add command menu entries for adding new snippet, workspace folder (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/module.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 this.create(Snippets.scriptSnippetModel.project(), ''); 270 this.create(Snippets.scriptSnippetModel.project(), '');
271 } 271 }
272 272
273 /** 273 /**
274 * @override 274 * @override
275 */ 275 */
276 sourceDeleted(uiSourceCode) { 276 sourceDeleted(uiSourceCode) {
277 this._handleRemoveSnippet(uiSourceCode); 277 this._handleRemoveSnippet(uiSourceCode);
278 } 278 }
279 }; 279 };
280
281 /**
282 * @implements {UI.ActionDelegate}
283 */
284 Sources.SourcesNavigatorView.CreatingActionDelegate = class {
285 /**
286 * @override
287 * @param {!UI.Context} context
288 * @param {string} actionId
289 * @return {boolean}
290 */
291 handleAction(context, actionId) {
292 switch (actionId) {
293 case 'sources.create-snippet':
294 var uiSourceCode = Snippets.scriptSnippetModel.createScriptSnippet('');
295 Common.Revealer.reveal(uiSourceCode);
296 return true;
297 case 'sources.add-folder-to-workspace':
298 Workspace.isolatedFileSystemManager.addFileSystem();
299 return true;
300 }
301 return false;
302 }
303 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698