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

Unified Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/LineLevelProfile.js

Issue 2608043002: DevTools: extract modules (with extensions) (Closed)
Patch Set: fix externs (PerfUI) Created 3 years, 11 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/perf_ui/LineLevelProfile.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/LineLevelProfile.js
similarity index 78%
rename from third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js
rename to third_party/WebKit/Source/devtools/front_end/perf_ui/LineLevelProfile.js
index b0351bbf14f61d242969d83a1f73fef3aca4e6a5..0f1ed19d114812b75a8c0324747d838f16b51300 100644
--- a/third_party/WebKit/Source/devtools/front_end/components_lazy/LineLevelProfile.js
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/LineLevelProfile.js
@@ -4,19 +4,19 @@
/**
* @unrestricted
*/
-Components.LineLevelProfile = class {
+PerfUI.LineLevelProfile = class {
constructor() {
this._locationPool = new Bindings.LiveLocationPool();
this.reset();
}
/**
- * @return {!Components.LineLevelProfile}
+ * @return {!PerfUI.LineLevelProfile}
*/
static instance() {
- if (!Components.LineLevelProfile._instance)
- Components.LineLevelProfile._instance = new Components.LineLevelProfile();
- return Components.LineLevelProfile._instance;
+ if (!PerfUI.LineLevelProfile._instance)
+ PerfUI.LineLevelProfile._instance = new PerfUI.LineLevelProfile();
+ return PerfUI.LineLevelProfile._instance;
}
/**
@@ -67,7 +67,7 @@ Components.LineLevelProfile = class {
// TODO(alph): use scriptId instead of urls for the target.
this._locationPool.disposeAll();
Workspace.workspace.uiSourceCodes().forEach(
- uiSourceCode => uiSourceCode.removeDecorationsForType(Components.LineLevelProfile.LineDecorator.type));
+ uiSourceCode => uiSourceCode.removeDecorationsForType(PerfUI.LineLevelProfile.LineDecorator.type));
for (var fileInfo of this._files) {
var url = /** @type {string} */ (fileInfo[0]);
var uiSourceCode = Workspace.workspace.uiSourceCodeForURL(url);
@@ -82,9 +82,9 @@ Components.LineLevelProfile = class {
var time = lineInfo[1];
var rawLocation = debuggerModel.createRawLocationByURL(url, line, 0);
if (rawLocation)
- new Components.LineLevelProfile.Presentation(rawLocation, time, this._locationPool);
+ new PerfUI.LineLevelProfile.Presentation(rawLocation, time, this._locationPool);
else if (uiSourceCode)
- uiSourceCode.addLineDecoration(line, Components.LineLevelProfile.LineDecorator.type, time);
+ uiSourceCode.addLineDecoration(line, PerfUI.LineLevelProfile.LineDecorator.type, time);
}
}
}
@@ -94,7 +94,7 @@ Components.LineLevelProfile = class {
/**
* @unrestricted
*/
-Components.LineLevelProfile.Presentation = class {
+PerfUI.LineLevelProfile.Presentation = class {
/**
* @param {!SDK.DebuggerModel.Location} rawLocation
* @param {number} time
@@ -110,20 +110,20 @@ Components.LineLevelProfile.Presentation = class {
*/
updateLocation(liveLocation) {
if (this._uiLocation)
- this._uiLocation.uiSourceCode.removeDecorationsForType(Components.LineLevelProfile.LineDecorator.type);
+ this._uiLocation.uiSourceCode.removeDecorationsForType(PerfUI.LineLevelProfile.LineDecorator.type);
this._uiLocation = liveLocation.uiLocation();
if (this._uiLocation) {
this._uiLocation.uiSourceCode.addLineDecoration(
- this._uiLocation.lineNumber, Components.LineLevelProfile.LineDecorator.type, this._time);
+ this._uiLocation.lineNumber, PerfUI.LineLevelProfile.LineDecorator.type, this._time);
}
}
};
/**
- * @implements {Sources.UISourceCodeFrame.LineDecorator}
+ * @implements {SourceFrame.UISourceCodeFrame.LineDecorator}
* @unrestricted
*/
-Components.LineLevelProfile.LineDecorator = class {
+PerfUI.LineLevelProfile.LineDecorator = class {
/**
* @override
* @param {!Workspace.UISourceCode} uiSourceCode
@@ -131,7 +131,7 @@ Components.LineLevelProfile.LineDecorator = class {
*/
decorate(uiSourceCode, textEditor) {
var gutterType = 'CodeMirror-gutter-performance';
- var decorations = uiSourceCode.decorationsForType(Components.LineLevelProfile.LineDecorator.type);
+ var decorations = uiSourceCode.decorationsForType(PerfUI.LineLevelProfile.LineDecorator.type);
textEditor.uninstallGutter(gutterType);
if (!decorations || !decorations.size)
return;
@@ -148,4 +148,4 @@ Components.LineLevelProfile.LineDecorator = class {
}
};
-Components.LineLevelProfile.LineDecorator.type = 'performance';
+PerfUI.LineLevelProfile.LineDecorator.type = 'performance';

Powered by Google App Engine
This is Rietveld 408576698