1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * This view displays a summary of the state of each QUIC session, and
7 * has links to display them in the events tab.
9 var QuicView
= (function() {
12 // We inherit from DivView.
13 var superClass
= DivView
;
19 assertFirstConstructorCall(QuicView
);
21 // Call superclass's constructor.
22 superClass
.call(this, QuicView
.MAIN_BOX_ID
);
24 g_browser
.addQuicInfoObserver(this, true);
27 QuicView
.TAB_ID
= 'tab-handle-quic';
28 QuicView
.TAB_NAME
= 'QUIC';
29 QuicView
.TAB_HASH
= '#quic';
31 // IDs for special HTML elements in quic_view.html
32 QuicView
.MAIN_BOX_ID
= 'quic-view-tab-content';
34 cr
.addSingletonGetter(QuicView
);
36 QuicView
.prototype = {
37 // Inherit the superclass's methods.
38 __proto__
: superClass
.prototype,
40 onLoadLogFinish: function(data
) {
41 return this.onQuicInfoChanged(data
.quicInfo
);
45 * If there are any sessions, display a single table with
46 * information on each QUIC session. Otherwise, displays "None".
48 onQuicInfoChanged: function(quicInfo
) {
51 var input
= new JsEvalContext(quicInfo
);
52 jstProcess(input
, $(QuicView
.MAIN_BOX_ID
));