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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 2869293002: DevTools: make CompilerScriptMapping / SASSSourceMapping manage UISourceCodes (Closed)
Patch Set: Created 3 years, 7 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 Persistence.persistence.addEventListener( 67 Persistence.persistence.addEventListener(
68 Persistence.Persistence.Events.BindingCreated, this._onBindingCreated, this); 68 Persistence.Persistence.Events.BindingCreated, this._onBindingCreated, this);
69 Persistence.persistence.addEventListener( 69 Persistence.persistence.addEventListener(
70 Persistence.Persistence.Events.BindingRemoved, this._onBindingRemoved, this); 70 Persistence.Persistence.Events.BindingRemoved, this._onBindingRemoved, this);
71 } 71 }
72 SDK.targetManager.addEventListener(SDK.TargetManager.Events.NameChanged, thi s._targetNameChanged, this); 72 SDK.targetManager.addEventListener(SDK.TargetManager.Events.NameChanged, thi s._targetNameChanged, this);
73 73
74 SDK.targetManager.observeTargets(this); 74 SDK.targetManager.observeTargets(this);
75 this._resetWorkspace(Workspace.workspace); 75 this._resetWorkspace(Workspace.workspace);
76 this._workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this)); 76 this._workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this));
77 Bindings.networkProjectManager.addEventListener(
78 Bindings.NetworkProjectManager.Events.FrameAttributionChanged, this._fra meAttributionChanged, this);
77 } 79 }
78 80
79 /** 81 /**
80 * @param {!UI.TreeElement} treeElement 82 * @param {!UI.TreeElement} treeElement
81 */ 83 */
82 static _treeElementOrder(treeElement) { 84 static _treeElementOrder(treeElement) {
83 if (treeElement._boostOrder) 85 if (treeElement._boostOrder)
84 return 0; 86 return 0;
85 87
86 if (!Sources.NavigatorView._typeOrders) { 88 if (!Sources.NavigatorView._typeOrders) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 237
236 /** 238 /**
237 * @param {!Workspace.UISourceCode} uiSourceCode 239 * @param {!Workspace.UISourceCode} uiSourceCode
238 * @return {boolean} 240 * @return {boolean}
239 */ 241 */
240 accept(uiSourceCode) { 242 accept(uiSourceCode) {
241 return !uiSourceCode.project().isServiceProject(); 243 return !uiSourceCode.project().isServiceProject();
242 } 244 }
243 245
244 /** 246 /**
247 * @param {!Common.Event} event
248 */
249 _frameAttributionChanged(event) {
250 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data);
251 this._removeUISourceCode(uiSourceCode);
dgozman 2017/05/10 18:10:33 This is not very efficient if UISourceCode gets ma
lushnikov 2017/05/10 22:24:32 Done.
252 this._addUISourceCode(uiSourceCode);
253 }
254
255 /**
245 * @param {!Workspace.UISourceCode} uiSourceCode 256 * @param {!Workspace.UISourceCode} uiSourceCode
246 */ 257 */
247 _addUISourceCode(uiSourceCode) { 258 _addUISourceCode(uiSourceCode) {
248 if (!this.accept(uiSourceCode)) 259 if (!this.accept(uiSourceCode))
249 return; 260 return;
250 261
251 var binding = Persistence.persistence.binding(uiSourceCode); 262 var binding = Persistence.persistence.binding(uiSourceCode);
252 if (!Runtime.experiments.isEnabled('persistence2') && binding && binding.net work === uiSourceCode) 263 if (!Runtime.experiments.isEnabled('persistence2') && binding && binding.net work === uiSourceCode)
253 return; 264 return;
254 265
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 /** 1606 /**
1596 * @param {string} title 1607 * @param {string} title
1597 * @override 1608 * @override
1598 */ 1609 */
1599 setTitle(title) { 1610 setTitle(title) {
1600 this._title = title; 1611 this._title = title;
1601 if (this._treeElement) 1612 if (this._treeElement)
1602 this._treeElement.title = this._title; 1613 this._treeElement.title = this._title;
1603 } 1614 }
1604 }; 1615 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698