| 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'; |
| 11 | 11 |
| 12 // We inherit from DivView. | 12 // We inherit from DivView. |
| 13 var superClass = DivView; | 13 var superClass = DivView; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * @constructor | 16 * @constructor |
| 17 */ | 17 */ |
| 18 function SpdyView() { | 18 function SpdyView() { |
| 19 assertFirstConstructorCall(SpdyView); | 19 assertFirstConstructorCall(SpdyView); |
| 20 | 20 |
| 21 // Call superclass's constructor. | 21 // Call superclass's constructor. |
| 22 superClass.call(this, SpdyView.MAIN_BOX_ID); | 22 superClass.call(this, SpdyView.MAIN_BOX_ID); |
| 23 | 23 |
| 24 g_browser.addSpdySessionInfoObserver(this, true); | 24 g_browser.addSpdySessionInfoObserver(this, true); |
| 25 g_browser.addSpdyStatusObserver(this, true); | 25 g_browser.addSpdyStatusObserver(this, true); |
| 26 g_browser.addSpdyAlternateProtocolMappingsObserver(this, true); | 26 g_browser.addSpdyAlternateProtocolMappingsObserver(this, true); |
| 27 } | 27 } |
| 28 | 28 |
| 29 SpdyView.TAB_ID = 'tab-handle-spdy'; | 29 SpdyView.TAB_ID = 'tab-handle-spdy'; |
| 30 SpdyView.TAB_NAME = 'SPDY'; | 30 SpdyView.TAB_NAME = 'HTTP/2'; |
| 31 SpdyView.TAB_HASH = '#spdy'; | 31 SpdyView.TAB_HASH = '#spdy'; |
| 32 | 32 |
| 33 // IDs for special HTML elements in spdy_view.html | 33 // IDs for special HTML elements in spdy_view.html |
| 34 SpdyView.MAIN_BOX_ID = 'spdy-view-tab-content'; | 34 SpdyView.MAIN_BOX_ID = 'spdy-view-tab-content'; |
| 35 SpdyView.STATUS_ID = 'spdy-view-status'; | 35 SpdyView.STATUS_ID = 'spdy-view-status'; |
| 36 SpdyView.SESSION_INFO_ID = 'spdy-view-session-info'; | 36 SpdyView.SESSION_INFO_ID = 'spdy-view-session-info'; |
| 37 SpdyView.ALTERNATE_PROTOCOL_MAPPINGS_ID = | 37 SpdyView.ALTERNATE_PROTOCOL_MAPPINGS_ID = |
| 38 'spdy-view-alternate-protocol-mappings'; | 38 'spdy-view-alternate-protocol-mappings'; |
| 39 | 39 |
| 40 cr.addSingletonGetter(SpdyView); | 40 cr.addSingletonGetter(SpdyView); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return false; | 82 return false; |
| 83 var input = new JsEvalContext( | 83 var input = new JsEvalContext( |
| 84 {spdyAlternateProtocolMappings: spdyAlternateProtocolMappings}); | 84 {spdyAlternateProtocolMappings: spdyAlternateProtocolMappings}); |
| 85 jstProcess(input, $(SpdyView.ALTERNATE_PROTOCOL_MAPPINGS_ID)); | 85 jstProcess(input, $(SpdyView.ALTERNATE_PROTOCOL_MAPPINGS_ID)); |
| 86 return true; | 86 return true; |
| 87 } | 87 } |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 return SpdyView; | 90 return SpdyView; |
| 91 })(); | 91 })(); |
| OLD | NEW |