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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js

Issue 2501883002: DevTools: kill Bindings.NetworkMapping (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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 this._reset(); 373 this._reset();
374 Common.EventTarget.removeEventListeners(this._eventListeners); 374 Common.EventTarget.removeEventListeners(this._eventListeners);
375 delete this.target()[Bindings.NetworkProject._networkProjectSymbol]; 375 delete this.target()[Bindings.NetworkProject._networkProjectSymbol];
376 } 376 }
377 377
378 _reset() { 378 _reset() {
379 for (var project of this._workspaceProjects.values()) 379 for (var project of this._workspaceProjects.values())
380 project.removeProject(); 380 project.removeProject();
381 this._workspaceProjects.clear(); 381 this._workspaceProjects.clear();
382 } 382 }
383
384 /**
385 * @param {!Workspace.Workspace} workspace
386 * @param {string} url
387 * @param {!SDK.Script} script
388 * @return {?Workspace.UISourceCode}
389 */
390 static uiSourceCodeForScriptURL(workspace, url, script) {
391 var target = script.target();
392 var frame = SDK.ResourceTreeFrame.fromScript(script);
393 return workspace.uiSourceCode(Bindings.NetworkProject.projectId(target, fram e, false), url) ||
394 workspace.uiSourceCode(Bindings.NetworkProject.projectId(target, frame, true), url);
395 }
396
397 /**
398 * @param {!Workspace.Workspace} workspace
399 * @param {string} url
400 * @param {!SDK.CSSStyleSheetHeader} header
401 * @return {?Workspace.UISourceCode}
402 */
403 static uiSourceCodeForStyleURL(workspace, url, header) {
404 var frame = SDK.ResourceTreeFrame.fromStyleSheet(header);
405 return workspace.uiSourceCode(Bindings.NetworkProject.projectId(header.targe t(), frame, false), url);
406 }
383 }; 407 };
384 408
385 Bindings.NetworkProject._networkProjectSymbol = Symbol('networkProject'); 409 Bindings.NetworkProject._networkProjectSymbol = Symbol('networkProject');
386 Bindings.NetworkProject._resourceSymbol = Symbol('resource'); 410 Bindings.NetworkProject._resourceSymbol = Symbol('resource');
387 Bindings.NetworkProject._scriptSymbol = Symbol('script'); 411 Bindings.NetworkProject._scriptSymbol = Symbol('script');
388 Bindings.NetworkProject._styleSheetSymbol = Symbol('styleSheet'); 412 Bindings.NetworkProject._styleSheetSymbol = Symbol('styleSheet');
389 Bindings.NetworkProject._targetSymbol = Symbol('target'); 413 Bindings.NetworkProject._targetSymbol = Symbol('target');
390 Bindings.NetworkProject._frameSymbol = Symbol('frame'); 414 Bindings.NetworkProject._frameSymbol = Symbol('frame');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698