| 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 73f94fa7a6decef8c50dabeec7ebd7e78ffa3266..b80abb420e442970e64a9e32c0622547a65809cb 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| @@ -78,6 +78,104 @@ WebInspector.SourcesNavigatorView.prototype = {
|
| this.revealUISourceCode(uiSourceCode, true);
|
| },
|
|
|
| + /**
|
| + * @override
|
| + * @param {!Event} event
|
| + */
|
| + handleContextMenu: function(event)
|
| + {
|
| + var contextMenu = new WebInspector.ContextMenu(event);
|
| + WebInspector.NavigatorView.appendAddFolderItem(contextMenu);
|
| + contextMenu.show();
|
| + },
|
| +
|
| + __proto__: WebInspector.NavigatorView.prototype
|
| +}
|
| +
|
| +/**
|
| + * @constructor
|
| + * @extends {WebInspector.NavigatorView}
|
| + */
|
| +WebInspector.NetworkNavigatorView = function()
|
| +{
|
| + WebInspector.NavigatorView.call(this);
|
| + WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
|
| +}
|
| +
|
| +WebInspector.NetworkNavigatorView.prototype = {
|
| + /**
|
| + * @override
|
| + * @param {!WebInspector.UISourceCode} uiSourceCode
|
| + * @return {boolean}
|
| + */
|
| + accept: function(uiSourceCode)
|
| + {
|
| + return uiSourceCode.project().type() === WebInspector.projectTypes.Network;
|
| + },
|
| +
|
| + /**
|
| + * @param {!WebInspector.Event} event
|
| + */
|
| + _inspectedURLChanged: function(event)
|
| + {
|
| + var mainTarget = WebInspector.targetManager.mainTarget();
|
| + if (event.data !== mainTarget)
|
| + return;
|
| + var inspectedURL = mainTarget && mainTarget.inspectedURL();
|
| + if (!inspectedURL)
|
| + return
|
| + for (var node of this._uiSourceCodeNodes.valuesArray()) {
|
| + var uiSourceCode = node.uiSourceCode();
|
| + if (uiSourceCode.url() === inspectedURL)
|
| + this.revealUISourceCode(uiSourceCode, true);
|
| + }
|
| + },
|
| +
|
| + /**
|
| + * @override
|
| + * @param {!WebInspector.UISourceCode} uiSourceCode
|
| + */
|
| + uiSourceCodeAdded: function(uiSourceCode)
|
| + {
|
| + var inspectedPageURL = WebInspector.targetManager.mainTarget().inspectedURL();
|
| + if (uiSourceCode.url() === inspectedPageURL)
|
| + this.revealUISourceCode(uiSourceCode, true);
|
| + },
|
| +
|
| + __proto__: WebInspector.NavigatorView.prototype
|
| +}
|
| +
|
| +/**
|
| + * @constructor
|
| + * @extends {WebInspector.NavigatorView}
|
| + */
|
| +WebInspector.FilesNavigatorView = function()
|
| +{
|
| + WebInspector.NavigatorView.call(this);
|
| +}
|
| +
|
| +WebInspector.FilesNavigatorView.prototype = {
|
| + /**
|
| + * @override
|
| + * @param {!WebInspector.UISourceCode} uiSourceCode
|
| + * @return {boolean}
|
| + */
|
| + accept: function(uiSourceCode)
|
| + {
|
| + return uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem;
|
| + },
|
| +
|
| + /**
|
| + * @override
|
| + * @param {!Event} event
|
| + */
|
| + handleContextMenu: function(event)
|
| + {
|
| + var contextMenu = new WebInspector.ContextMenu(event);
|
| + WebInspector.NavigatorView.appendAddFolderItem(contextMenu);
|
| + contextMenu.show();
|
| + },
|
| +
|
| __proto__: WebInspector.NavigatorView.prototype
|
| }
|
|
|
| @@ -98,8 +196,6 @@ WebInspector.ContentScriptsNavigatorView.prototype = {
|
| */
|
| accept: function(uiSourceCode)
|
| {
|
| - if (!WebInspector.NavigatorView.prototype.accept(uiSourceCode))
|
| - return false;
|
| return uiSourceCode.project().type() === WebInspector.projectTypes.ContentScripts;
|
| },
|
|
|
| @@ -123,8 +219,6 @@ WebInspector.SnippetsNavigatorView.prototype = {
|
| */
|
| accept: function(uiSourceCode)
|
| {
|
| - if (!WebInspector.NavigatorView.prototype.accept(uiSourceCode))
|
| - return false;
|
| return uiSourceCode.project().type() === WebInspector.projectTypes.Snippets;
|
| },
|
|
|
|
|