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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/devtools/BUILD.gn ('k') | third_party/WebKit/Source/devtools/front_end/Tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c3185964f528aa003750b1b68fc12a9cf7395ebe..aa3a2986dc256a2a822fe7fd874aa410b514fe5d 100644
--- a/third_party/WebKit/Source/devtools/front_end/Runtime.js
+++ b/third_party/WebKit/Source/devtools/front_end/Runtime.js
@@ -764,6 +764,14 @@ Runtime.Module = class {
_loadScripts() {
if (!this._descriptor.scripts || !this._descriptor.scripts.length)
return Promise.resolve();
+
+ // Module namespaces.
+ var namespace = this._name.replace('_lazy', '');
+ if (namespace === 'sdk' || namespace === 'ui')
+ namespace = namespace.toUpperCase();
+ namespace = namespace.split('_').map(a => a.substring(0, 1).toUpperCase() + a.substring(1)).join('');
+ self[namespace] = self[namespace] || {};
+
return Runtime._loadScriptsPromise(this._descriptor.scripts.map(this._modularizeURL, this), this._remoteBase());
}
@@ -882,7 +890,7 @@ Runtime.Extension = class {
* @return {string}
*/
title() {
- // FIXME: should be WebInspector.UIString() but runtime is not l10n aware yet.
+ // FIXME: should be Common.UIString() but runtime is not l10n aware yet.
return this._descriptor['title-' + Runtime._platform] || this._descriptor['title'];
}
« no previous file with comments | « third_party/WebKit/Source/devtools/BUILD.gn ('k') | third_party/WebKit/Source/devtools/front_end/Tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698