| OLD | NEW |
| 1 // Copyright (c) 2011 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 HTTP pipelined connection, | 6 * This view displays a summary of the state of each HTTP pipelined connection, |
| 7 * and has links to display them in the events tab. | 7 * and has links to display them in the events tab. |
| 8 */ | 8 */ |
| 9 var HttpPipelineView = (function() { | 9 var HttpPipelineView = (function() { |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 this.httpPipelineConnectionsDiv_.innerHTML = ''; | 82 this.httpPipelineConnectionsDiv_.innerHTML = ''; |
| 83 | 83 |
| 84 var hasInfo = (httpPipelinedConnectionInfo != null && | 84 var hasInfo = (httpPipelinedConnectionInfo != null && |
| 85 httpPipelinedConnectionInfo.length > 0); | 85 httpPipelinedConnectionInfo.length > 0); |
| 86 setNodeDisplay(this.httpPipelineConnectionsNoneSpan_, !hasInfo); | 86 setNodeDisplay(this.httpPipelineConnectionsNoneSpan_, !hasInfo); |
| 87 setNodeDisplay(this.httpPipelineConnectionsLinkSpan_, hasInfo); | 87 setNodeDisplay(this.httpPipelineConnectionsLinkSpan_, hasInfo); |
| 88 | 88 |
| 89 if (hasInfo) { | 89 if (hasInfo) { |
| 90 var tablePrinter = createConnectionTablePrinter( | 90 var tablePrinter = createConnectionTablePrinter( |
| 91 httpPipelinedConnectionInfo); | 91 httpPipelinedConnectionInfo); |
| 92 tablePrinter.toHTML(this.httpPipelineConnectionsDiv_, 'styledTable'); | 92 tablePrinter.toHTML(this.httpPipelineConnectionsDiv_, 'styled-table'); |
| 93 } | 93 } |
| 94 | 94 |
| 95 return true; | 95 return true; |
| 96 }, | 96 }, |
| 97 | 97 |
| 98 /** | 98 /** |
| 99 * If |httpPipeliningKnownHosts| is not empty, displays a single table | 99 * If |httpPipeliningKnownHosts| is not empty, displays a single table |
| 100 * with information on known pipelining hosts. Otherwise, displays "None". | 100 * with information on known pipelining hosts. Otherwise, displays "None". |
| 101 */ | 101 */ |
| 102 displayHttpPipeliningKnownHosts: function(httpPipeliningKnownHosts) { | 102 displayHttpPipeliningKnownHosts: function(httpPipeliningKnownHosts) { |
| 103 this.httpPipelineKnownHostsDiv_.innerHTML = ''; | 103 this.httpPipelineKnownHostsDiv_.innerHTML = ''; |
| 104 | 104 |
| 105 if (httpPipeliningKnownHosts != null && | 105 if (httpPipeliningKnownHosts != null && |
| 106 httpPipeliningKnownHosts.length > 0) { | 106 httpPipeliningKnownHosts.length > 0) { |
| 107 var tabPrinter = createKnownHostsTablePrinter(httpPipeliningKnownHosts); | 107 var tabPrinter = createKnownHostsTablePrinter(httpPipeliningKnownHosts); |
| 108 tabPrinter.toHTML( | 108 tabPrinter.toHTML( |
| 109 this.httpPipelineKnownHostsDiv_, 'styledTable'); | 109 this.httpPipelineKnownHostsDiv_, 'styled-table'); |
| 110 } else { | 110 } else { |
| 111 this.httpPipelineKnownHostsDiv_.innerHTML = 'None'; | 111 this.httpPipelineKnownHostsDiv_.innerHTML = 'None'; |
| 112 } | 112 } |
| 113 return true; | 113 return true; |
| 114 } | 114 } |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * Creates a table printer to print out the state of a list of HTTP pipelined | 118 * Creates a table printer to print out the state of a list of HTTP pipelined |
| 119 * connections. | 119 * connections. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 tablePrinter.addRow(); | 160 tablePrinter.addRow(); |
| 161 | 161 |
| 162 tablePrinter.addCell(entry.host); | 162 tablePrinter.addCell(entry.host); |
| 163 tablePrinter.addCell(entry.capability); | 163 tablePrinter.addCell(entry.capability); |
| 164 } | 164 } |
| 165 return tablePrinter; | 165 return tablePrinter; |
| 166 } | 166 } |
| 167 | 167 |
| 168 return HttpPipelineView; | 168 return HttpPipelineView; |
| 169 })(); | 169 })(); |
| OLD | NEW |