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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 WebInspector.RequestTimingView = function(request, calculator) 37 WebInspector.RequestTimingView = function(request, calculator)
38 { 38 {
39 WebInspector.VBox.call(this); 39 WebInspector.VBox.call(this);
40 this.element.classList.add("resource-timing-view"); 40 this.element.classList.add("resource-timing-view");
41 41
42 this._request = request; 42 this._request = request;
43 this._calculator = calculator; 43 this._calculator = calculator;
44 }; 44 };
45 45
46 WebInspector.RequestTimingView.prototype = { 46 WebInspector.RequestTimingView.prototype = {
47 /**
48 * @override
49 */
47 wasShown: function() 50 wasShown: function()
48 { 51 {
49 this._request.addEventListener(WebInspector.NetworkRequest.Events.Timing Changed, this._refresh, this); 52 this._request.addEventListener(WebInspector.NetworkRequest.Events.Timing Changed, this._refresh, this);
50 this._request.addEventListener(WebInspector.NetworkRequest.Events.Finish edLoading, this._refresh, this); 53 this._request.addEventListener(WebInspector.NetworkRequest.Events.Finish edLoading, this._refresh, this);
51 this._calculator.addEventListener(WebInspector.NetworkTimeCalculator.Eve nts.BoundariesChanged, this._refresh, this); 54 this._calculator.addEventListener(WebInspector.NetworkTimeCalculator.Eve nts.BoundariesChanged, this._refresh, this);
52 this._refresh(); 55 this._refresh();
53 }, 56 },
54 57
58 /**
59 * @override
60 */
55 willHide: function() 61 willHide: function()
56 { 62 {
57 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Tim ingChanged, this._refresh, this); 63 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Tim ingChanged, this._refresh, this);
58 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Fin ishedLoading, this._refresh, this); 64 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Fin ishedLoading, this._refresh, this);
59 this._calculator.removeEventListener(WebInspector.NetworkTimeCalculator. Events.BoundariesChanged, this._refresh, this); 65 this._calculator.removeEventListener(WebInspector.NetworkTimeCalculator. Events.BoundariesChanged, this._refresh, this);
60 }, 66 },
61 67
62 _refresh: function() 68 _refresh: function()
63 { 69 {
64 if (this._tableElement) 70 if (this._tableElement)
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 */ 346 */
341 function createHeader(title) 347 function createHeader(title)
342 { 348 {
343 var dataHeader = tableElement.createChild("tr", "network-timing-table-he ader"); 349 var dataHeader = tableElement.createChild("tr", "network-timing-table-he ader");
344 dataHeader.createChild("td").createTextChild(title); 350 dataHeader.createChild("td").createTextChild(title);
345 dataHeader.createChild("td").createTextChild(""); 351 dataHeader.createChild("td").createTextChild("");
346 dataHeader.createChild("td").createTextChild(WebInspector.UIString("TIME ")); 352 dataHeader.createChild("td").createTextChild(WebInspector.UIString("TIME "));
347 return dataHeader; 353 return dataHeader;
348 } 354 }
349 }; 355 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698