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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 2204303003: DevTools: encapsulate extensible tabbed widget into the view manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index 33d4954150a9f2f7c29362168de3ce53166919cb..60596075a7e33af05d53569a4ad44adb41ae6da1 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -64,8 +64,8 @@ WebInspector.SourcesPanel = function()
this._splitWidget.setMainWidget(this.editorView);
// Create navigator tabbed pane with toolbar.
- this._navigatorTabbedPane = new WebInspector.ExtensibleTabbedPane("navigator-view", true);
- var tabbedPane = this._navigatorTabbedPane.tabbedPane();
+ this._navigatorTabbedLocation = WebInspector.viewManager.createTabbedLocation("navigator-view", true);
+ var tabbedPane = this._navigatorTabbedLocation.tabbedPane();
tabbedPane.setMinimumSize(100, 25);
tabbedPane.setShrinkableTabs(true);
tabbedPane.element.classList.add("navigator-tabbed-pane");
@@ -74,7 +74,7 @@ WebInspector.SourcesPanel = function()
navigatorMenuButton.setTitle(WebInspector.UIString("More options"));
navigatorToolbar.appendToolbarItem(navigatorMenuButton);
tabbedPane.appendAfterTabStrip(navigatorToolbar.element);
- this.editorView.setSidebarWidget(this._navigatorTabbedPane);
+ this.editorView.setSidebarWidget(tabbedPane);
this._sourcesView = new WebInspector.SourcesView();
this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSelected, this._editorSelected.bind(this));
@@ -219,10 +219,10 @@ WebInspector.SourcesPanel.prototype = {
* @param {string} locationName
* @return {?WebInspector.ViewLocation}
*/
- resolveLocation: function(locationName)
+ revealLocation: function(locationName)
{
WebInspector.inspectorView.setCurrentPanel(WebInspector.SourcesPanel.instance());
- return this._navigatorTabbedPane;
+ return this._navigatorTabbedLocation;
},
/**
@@ -929,7 +929,7 @@ WebInspector.SourcesPanel.prototype = {
var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (target);
var projectType = uiSourceCode.project().type();
- if (projectType !== WebInspector.projectTypes.Debugger && !event.target.isSelfOrDescendant(this._navigatorTabbedPane.element)) {
+ if (projectType !== WebInspector.projectTypes.Debugger && !event.target.isSelfOrDescendant(this._navigatorTabbedLocation.widget().element)) {
contextMenu.appendItem(WebInspector.UIString.capitalize("Reveal in ^navigator"), this._handleContextMenuReveal.bind(this, uiSourceCode));
contextMenu.appendSeparator();
}

Powered by Google App Engine
This is Rietveld 408576698