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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js

Issue 2500233002: DevTools: move revealSourceLine handler from Networkmapping to Main (Closed)
Patch Set: rebaseline 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 | « no previous file | third_party/WebKit/Source/devtools/front_end/main/Main.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/bindings/NetworkMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
index 19d535f0a1ecdf5670886fedbc9ea9300cb5080b..d87766cae4198b7fbf8b9f0c91281a553520706e 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
@@ -10,8 +10,6 @@ Bindings.NetworkMapping = class {
*/
constructor(workspace) {
this._workspace = workspace;
- InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.RevealSourceLine, this._revealSourceLine, this);
}
/**
@@ -72,35 +70,6 @@ Bindings.NetworkMapping = class {
uiSourceCodeForURLForAnyTarget(url) {
return Workspace.workspace.uiSourceCodeForURL(url);
}
-
- /**
- * @param {!Common.Event} event
- */
- _revealSourceLine(event) {
- var url = /** @type {string} */ (event.data['url']);
- var lineNumber = /** @type {number} */ (event.data['lineNumber']);
- var columnNumber = /** @type {number} */ (event.data['columnNumber']);
-
- var uiSourceCode = this.uiSourceCodeForURLForAnyTarget(url);
- if (uiSourceCode) {
- Common.Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber));
- return;
- }
-
- /**
- * @param {!Common.Event} event
- * @this {Bindings.NetworkMapping}
- */
- function listener(event) {
- var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data);
- if (uiSourceCode.url() === url) {
- Common.Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber));
- this._workspace.removeEventListener(Workspace.Workspace.Events.UISourceCodeAdded, listener, this);
- }
- }
-
- this._workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, listener, this);
- }
};
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698