OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
6 * This view displays a summary of the state of each SPDY sessions, and | 6 * This view displays a summary of the state of each SPDY sessions, and |
7 * has links to display them in the events tab. | 7 * has links to display them in the events tab. |
8 */ | 8 */ |
9 var SpdyView = (function() { | 9 var SpdyView = (function() { |
10 'use strict'; | 10 'use strict'; |
(...skipping 24 matching lines...) Expand all Loading... |
35 SpdyView.SESSION_INFO_ID = 'spdy-view-session-info'; | 35 SpdyView.SESSION_INFO_ID = 'spdy-view-session-info'; |
36 | 36 |
37 cr.addSingletonGetter(SpdyView); | 37 cr.addSingletonGetter(SpdyView); |
38 | 38 |
39 SpdyView.prototype = { | 39 SpdyView.prototype = { |
40 // Inherit the superclass's methods. | 40 // Inherit the superclass's methods. |
41 __proto__: superClass.prototype, | 41 __proto__: superClass.prototype, |
42 | 42 |
43 onLoadLogFinish: function(data) { | 43 onLoadLogFinish: function(data) { |
44 return this.onSpdySessionInfoChanged(data.spdySessionInfo) && | 44 return this.onSpdySessionInfoChanged(data.spdySessionInfo) && |
45 this.onSpdyStatusChanged(data.spdyStatus); | 45 this.onSpdyStatusChanged(data.spdyStatus); |
46 }, | 46 }, |
47 | 47 |
48 /** | 48 /** |
49 * If |spdySessionInfo| contains any sessions, displays a single table with | 49 * If |spdySessionInfo| contains any sessions, displays a single table with |
50 * information on each SPDY session. Otherwise, displays "None". | 50 * information on each SPDY session. Otherwise, displays "None". |
51 */ | 51 */ |
52 onSpdySessionInfoChanged: function(spdySessionInfo) { | 52 onSpdySessionInfoChanged: function(spdySessionInfo) { |
53 if (!spdySessionInfo) | 53 if (!spdySessionInfo) |
54 return false; | 54 return false; |
55 var input = new JsEvalContext({ spdySessionInfo: spdySessionInfo }); | 55 var input = new JsEvalContext({spdySessionInfo: spdySessionInfo}); |
56 jstProcess(input, $(SpdyView.SESSION_INFO_ID)); | 56 jstProcess(input, $(SpdyView.SESSION_INFO_ID)); |
57 return true; | 57 return true; |
58 }, | 58 }, |
59 | 59 |
60 /** | 60 /** |
61 * Displays information on the global SPDY status. | 61 * Displays information on the global SPDY status. |
62 */ | 62 */ |
63 onSpdyStatusChanged: function(spdyStatus) { | 63 onSpdyStatusChanged: function(spdyStatus) { |
64 if (!spdyStatus) | 64 if (!spdyStatus) |
65 return false; | 65 return false; |
66 var input = new JsEvalContext(spdyStatus); | 66 var input = new JsEvalContext(spdyStatus); |
67 jstProcess(input, $(SpdyView.STATUS_ID)); | 67 jstProcess(input, $(SpdyView.STATUS_ID)); |
68 return true; | 68 return true; |
69 } | 69 } |
70 }; | 70 }; |
71 | 71 |
72 return SpdyView; | 72 return SpdyView; |
73 })(); | 73 })(); |
OLD | NEW |