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

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: ready for review 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..9cdba82b8542f951859cd975a4e24f0728ce960a 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,6 +63,8 @@ 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);
@@ -77,9 +79,8 @@ WebInspector.SettingsScreen.prototype = {
* @param {string} locationName
* @return {?WebInspector.ViewLocation}
*/
- revealLocation: function(locationName)
+ resolveLocation: function(locationName)
{
- WebInspector.SettingsScreen._showSettingsScreen();
return this._tabbedLocation;
},
@@ -88,7 +89,7 @@ WebInspector.SettingsScreen.prototype = {
*/
selectTab: function(name)
dgozman 2016/08/06 00:56:10 Should this be a private function?
{
- this._tabbedLocation.showView(name);
+ WebInspector.viewManager.showView(name);
},
/**

Powered by Google App Engine
This is Rietveld 408576698