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

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

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 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 26 matching lines...) Expand all
37 */ 37 */
38 WebInspector.StylesSourceMapping = function(cssModel, workspace, networkMapping) 38 WebInspector.StylesSourceMapping = function(cssModel, workspace, networkMapping)
39 { 39 {
40 this._cssModel = cssModel; 40 this._cssModel = cssModel;
41 this._workspace = workspace; 41 this._workspace = workspace;
42 this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemove d, this._projectRemoved, this); 42 this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemove d, this._projectRemoved, this);
43 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeA dded, this._uiSourceCodeAddedToWorkspace, this); 43 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeA dded, this._uiSourceCodeAddedToWorkspace, this);
44 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeR emoved, this._uiSourceCodeRemoved, this); 44 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeR emoved, this._uiSourceCodeRemoved, this);
45 this._networkMapping = networkMapping; 45 this._networkMapping = networkMapping;
46 46
47 cssModel.target().resourceTreeModel.addEventListener(WebInspector.ResourceTr eeModel.EventTypes.MainFrameNavigated, this._unbindAllUISourceCodes, this); 47 cssModel.resourceTreeModel().addEventListener(WebInspector.ResourceTreeModel .EventTypes.MainFrameNavigated, this._unbindAllUISourceCodes, this);
pfeldman 2016/07/13 23:55:57 This isn't nice - we should keep models of differe
dgozman 2016/07/14 16:29:28 I'm not that sure. DOM only makes sense together w
eostroukhov-old 2016/07/20 23:46:15 Switched to TargetManager event
48 48
49 this._cssModel.addEventListener(WebInspector.CSSModel.Events.StyleSheetChang ed, this._styleSheetChanged, this); 49 this._cssModel.addEventListener(WebInspector.CSSModel.Events.StyleSheetChang ed, this._styleSheetChanged, this);
50 /** @type {!Map<string, !Map<string, !Map<string, !WebInspector.CSSStyleShee tHeader>>>} */ 50 /** @type {!Map<string, !Map<string, !Map<string, !WebInspector.CSSStyleShee tHeader>>>} */
51 this._urlToHeadersByFrameId = new Map(); 51 this._urlToHeadersByFrameId = new Map();
52 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.StyleFile>} */ 52 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.StyleFile>} */
53 this._styleFiles = new Map(); 53 this._styleFiles = new Map();
54 } 54 }
55 55
56 WebInspector.StylesSourceMapping.ChangeUpdateTimeoutMs = 200; 56 WebInspector.StylesSourceMapping.ChangeUpdateTimeoutMs = 200;
57 57
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 }, 396 },
397 397
398 dispose: function() 398 dispose: function()
399 { 399 {
400 if (this._terminated) 400 if (this._terminated)
401 return; 401 return;
402 this._terminated = true; 402 this._terminated = true;
403 WebInspector.EventTarget.removeEventListeners(this._eventListeners); 403 WebInspector.EventTarget.removeEventListeners(this._eventListeners);
404 } 404 }
405 } 405 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698