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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js

Issue 2512873002: [DevTools] Do not use external links for resources anymore. (Closed)
Patch Set: 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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @implements {SDK.TargetManager.Observer} 5 * @implements {SDK.TargetManager.Observer}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Resources.ServiceWorkersView = class extends UI.VBox { 8 Resources.ServiceWorkersView = class extends UI.VBox {
9 constructor() { 9 constructor() {
10 super(true); 10 super(true);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 var statusValue = this._wrapWidget(this._section.appendField(Common.UIString ('Status'))); 226 var statusValue = this._wrapWidget(this._section.appendField(Common.UIString ('Status')));
227 statusValue.removeChildren(); 227 statusValue.removeChildren();
228 var versionsStack = statusValue.createChild('div', 'service-worker-version-s tack'); 228 var versionsStack = statusValue.createChild('div', 'service-worker-version-s tack');
229 versionsStack.createChild('div', 'service-worker-version-stack-bar'); 229 versionsStack.createChild('div', 'service-worker-version-stack-bar');
230 230
231 if (active) { 231 if (active) {
232 var scriptElement = this._section.appendField(Common.UIString('Source')); 232 var scriptElement = this._section.appendField(Common.UIString('Source'));
233 scriptElement.removeChildren(); 233 scriptElement.removeChildren();
234 var fileName = Common.ParsedURL.extractName(active.scriptURL); 234 var fileName = Common.ParsedURL.extractName(active.scriptURL);
235 scriptElement.appendChild(Components.Linkifier.linkifyURLAsNode(active.scr iptURL, fileName)); 235 scriptElement.appendChild(Components.Linkifier.linkifyURL(active.scriptURL , fileName));
236 scriptElement.createChild('div', 'report-field-value-subtitle').textConten t = 236 scriptElement.createChild('div', 'report-field-value-subtitle').textConten t =
237 Common.UIString('Received %s', new Date(active.scriptResponseTime * 10 00).toLocaleString()); 237 Common.UIString('Received %s', new Date(active.scriptResponseTime * 10 00).toLocaleString());
238 238
239 var activeEntry = versionsStack.createChild('div', 'service-worker-version '); 239 var activeEntry = versionsStack.createChild('div', 'service-worker-version ');
240 activeEntry.createChild('div', 'service-worker-active-circle'); 240 activeEntry.createChild('div', 'service-worker-active-circle');
241 activeEntry.createChild('span').textContent = 241 activeEntry.createChild('span').textContent =
242 Common.UIString('#%s activated and is %s', active.id, active.runningSt atus); 242 Common.UIString('#%s activated and is %s', active.id, active.runningSt atus);
243 243
244 if (active.isRunning() || active.isStarting()) { 244 if (active.isRunning() || active.isStarting()) {
245 createLink(activeEntry, Common.UIString('stop'), this._stopButtonClicked .bind(this, active.id)); 245 createLink(activeEntry, Common.UIString('stop'), this._stopButtonClicked .bind(this, active.id));
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 shadowRoot.appendChild(contentElement); 418 shadowRoot.appendChild(contentElement);
419 return contentElement; 419 return contentElement;
420 } 420 }
421 421
422 _dispose() { 422 _dispose() {
423 this._linkifier.dispose(); 423 this._linkifier.dispose();
424 if (this._pendingUpdate) 424 if (this._pendingUpdate)
425 clearTimeout(this._pendingUpdate); 425 clearTimeout(this._pendingUpdate);
426 } 426 }
427 }; 427 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698