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

Unified Diff: third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js

Issue 2217783002: DevTools: use view locations in the elements and sources sidebars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 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/settings/SettingsScreen.js
diff --git a/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js b/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
index cea3b8763fd2e04ccbe157d852988d77b56c569f..bd5964bf4e415ced463ca31412dac6b6aa25ded6 100644
--- a/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
+++ b/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
@@ -44,7 +44,7 @@ WebInspector.SettingsScreen = function()
var settingsLabelElement = createElementWithClass("div", "help-window-label");
settingsLabelElement.createTextChild(WebInspector.UIString("Settings"));
- this._tabbedLocation = WebInspector.viewManager.createTabbedLocation("settings-view");
+ this._tabbedLocation = WebInspector.viewManager.createTabbedLocation(() => WebInspector.SettingsScreen._showSettingsScreen(), "settings-view");
var tabbedPane = this._tabbedLocation.tabbedPane();
tabbedPane.insertBeforeTabStrip(settingsLabelElement);
tabbedPane.setShrinkableTabs(false);
@@ -63,10 +63,12 @@ WebInspector.SettingsScreen = function()
WebInspector.SettingsScreen._showSettingsScreen = function(name)
{
var settingsScreen = /** @type {!WebInspector.SettingsScreen} */ (self.runtime.sharedInstance(WebInspector.SettingsScreen));
+ if (settingsScreen.isShowing())
+ return;
var dialog = new WebInspector.Dialog();
dialog.addCloseButton();
settingsScreen.show(dialog.element);
- settingsScreen.selectTab(name || "preferences");
+ settingsScreen._selectTab(name || "preferences");
dialog.show();
}
@@ -77,18 +79,17 @@ WebInspector.SettingsScreen.prototype = {
* @param {string} locationName
* @return {?WebInspector.ViewLocation}
*/
- revealLocation: function(locationName)
+ resolveLocation: function(locationName)
{
- WebInspector.SettingsScreen._showSettingsScreen();
return this._tabbedLocation;
},
/**
* @param {string} name
*/
- selectTab: function(name)
+ _selectTab: function(name)
{
- this._tabbedLocation.showView(name);
+ WebInspector.viewManager.showView(name);
},
/**

Powered by Google App Engine
This is Rietveld 408576698