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

Unified Diff: third_party/WebKit/Source/devtools/front_end/Runtime.js

Issue 2142303002: Revert of DevTools: automatically populate 'More tools' submenu with the drawer views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/Runtime.js
diff --git a/third_party/WebKit/Source/devtools/front_end/Runtime.js b/third_party/WebKit/Source/devtools/front_end/Runtime.js
index e79325f04c432999ec998c5dfa7768851289f816..a1e681fb335bb6848dcae97e927f64116c6244a3 100644
--- a/third_party/WebKit/Source/devtools/front_end/Runtime.js
+++ b/third_party/WebKit/Source/devtools/front_end/Runtime.js
@@ -455,16 +455,6 @@
Runtime._originalAssert.call(Runtime._console, value, message + " " + new Error().stack);
}
-Runtime._platform = "";
-
-/**
- * @param {string} platform
- */
-Runtime.setPlatform = function(platform)
-{
- Runtime._platform = platform;
-}
-
Runtime.prototype = {
useTestBase: function()
{
@@ -573,12 +563,11 @@
/**
* @param {*} type
* @param {?Object=} context
- * @param {boolean=} sortByTitle
* @return {!Array.<!Runtime.Extension>}
*/
- extensions: function(type, context, sortByTitle)
- {
- return this._extensions.filter(filter).sort(sortByTitle ? titleComparator : orderComparator);
+ extensions: function(type, context)
+ {
+ return this._extensions.filter(filter).sort(orderComparator);
/**
* @param {!Runtime.Extension} extension
@@ -604,18 +593,6 @@
var order2 = extension2.descriptor()["order"] || 0;
return order1 - order2;
}
-
- /**
- * @param {!Runtime.Extension} extension1
- * @param {!Runtime.Extension} extension2
- * @return {number}
- */
- function titleComparator(extension1, extension2)
- {
- var title1 = extension1.title() || "";
- var title2 = extension2.title() || "";
- return title1.localeCompare(title2);
- }
},
/**
@@ -1001,12 +978,13 @@
},
/**
+ * @param {string} platform
* @return {string}
*/
- title: function()
+ title: function(platform)
{
// FIXME: should be WebInspector.UIString() but runtime is not l10n aware yet.
- return this._descriptor["title-" + Runtime._platform] || this._descriptor["title"];
+ return this._descriptor["title-" + platform] || this._descriptor["title"];
}
}

Powered by Google App Engine
This is Rietveld 408576698