| Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| index 6d1ac998834d415b1bd7788bad974a55ae21fe13..ea64e67917fb4b29fce7cdba4e0adcc2b2948e21 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| @@ -277,3 +277,27 @@ Sources.SnippetsNavigatorView = class extends Sources.NavigatorView {
|
| this._handleRemoveSnippet(uiSourceCode);
|
| }
|
| };
|
| +
|
| +/**
|
| + * @implements {UI.ActionDelegate}
|
| + */
|
| +Sources.SourcesNavigatorView.CreatingActionDelegate = class {
|
| + /**
|
| + * @override
|
| + * @param {!UI.Context} context
|
| + * @param {string} actionId
|
| + * @return {boolean}
|
| + */
|
| + handleAction(context, actionId) {
|
| + switch (actionId) {
|
| + case 'sources.create-snippet':
|
| + var uiSourceCode = Snippets.scriptSnippetModel.createScriptSnippet('');
|
| + Common.Revealer.reveal(uiSourceCode);
|
| + return true;
|
| + case 'sources.add-folder-to-workspace':
|
| + Workspace.isolatedFileSystemManager.addFileSystem();
|
| + return true;
|
| + }
|
| + return false;
|
| + }
|
| +};
|
|
|