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

Side by Side Diff: chrome/browser/resources/net_internals/main.js

Issue 6465001: Display more information at chrome://net-internals/#spdy... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 * Dictionary of constants (initialized by browser). 6 * Dictionary of constants (initialized by browser).
7 */ 7 */
8 var LogEventType = null; 8 var LogEventType = null;
9 var LogEventPhase = null; 9 var LogEventPhase = null;
10 var ClientInfo = null; 10 var ClientInfo = null;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 'connectionTestsForm', 'testSummary'); 88 'connectionTestsForm', 'testSummary');
89 89
90 var httpCacheView = new HttpCacheView('httpCacheTabContent', 90 var httpCacheView = new HttpCacheView('httpCacheTabContent',
91 'httpCacheStats'); 91 'httpCacheStats');
92 92
93 var socketsView = new SocketsView('socketsTabContent', 93 var socketsView = new SocketsView('socketsTabContent',
94 'socketPoolDiv', 94 'socketPoolDiv',
95 'socketPoolGroupsDiv'); 95 'socketPoolGroupsDiv');
96 96
97 var spdyView = new SpdyView('spdyTabContent', 97 var spdyView = new SpdyView('spdyTabContent',
98 'spdyEnabledSpan',
99 'spdyUseAlternateProtocolSpan',
100 'spdyForceAlwaysSpan',
101 'spdyForceOverSslSpan',
102 'spdyNextProtocolsSpan',
103 'spdyAlternateProtocolMappingsDiv',
98 'spdySessionNoneSpan', 104 'spdySessionNoneSpan',
99 'spdySessionLinkSpan', 105 'spdySessionLinkSpan',
100 'spdySessionDiv'); 106 'spdySessionDiv');
101 107
102
103 var serviceView; 108 var serviceView;
104 if (g_browser.isPlatformWindows()) { 109 if (g_browser.isPlatformWindows()) {
105 serviceView = new ServiceProvidersView('serviceProvidersTab', 110 serviceView = new ServiceProvidersView('serviceProvidersTab',
106 'serviceProvidersTabContent', 111 'serviceProvidersTabContent',
107 'serviceProvidersTbody', 112 'serviceProvidersTbody',
108 'namespaceProvidersTbody'); 113 'namespaceProvidersTbody');
109 } 114 }
110 115
111 // Create a view which lets you tab between the different sub-views. 116 // Create a view which lets you tab between the different sub-views.
112 var categoryTabSwitcher = new TabSwitcherView('categoryTabHandles'); 117 var categoryTabSwitcher = new TabSwitcherView('categoryTabHandles');
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 this.sendGetHttpCacheInfo.bind(this)); 182 this.sendGetHttpCacheInfo.bind(this));
178 this.pollableDataHelpers_.hostResolverInfo = 183 this.pollableDataHelpers_.hostResolverInfo =
179 new PollableDataHelper('onHostResolverInfoChanged', 184 new PollableDataHelper('onHostResolverInfoChanged',
180 this.sendGetHostResolverInfo.bind(this)); 185 this.sendGetHostResolverInfo.bind(this));
181 this.pollableDataHelpers_.socketPoolInfo = 186 this.pollableDataHelpers_.socketPoolInfo =
182 new PollableDataHelper('onSocketPoolInfoChanged', 187 new PollableDataHelper('onSocketPoolInfoChanged',
183 this.sendGetSocketPoolInfo.bind(this)); 188 this.sendGetSocketPoolInfo.bind(this));
184 this.pollableDataHelpers_.spdySessionInfo = 189 this.pollableDataHelpers_.spdySessionInfo =
185 new PollableDataHelper('onSpdySessionInfoChanged', 190 new PollableDataHelper('onSpdySessionInfoChanged',
186 this.sendGetSpdySessionInfo.bind(this)); 191 this.sendGetSpdySessionInfo.bind(this));
192 this.pollableDataHelpers_.spdyStatus =
193 new PollableDataHelper('onSpdyStatusChanged',
194 this.sendGetSpdyStatus.bind(this));
195 this.pollableDataHelpers_.spdyAlternateProtocolMappings =
196 new PollableDataHelper('onSpdyAlternateProtocolMappingsChanged',
197 this.sendGetSpdyAlternateProtocolMappings.bind(
198 this));
187 if (this.isPlatformWindows()) { 199 if (this.isPlatformWindows()) {
188 this.pollableDataHelpers_.serviceProviders = 200 this.pollableDataHelpers_.serviceProviders =
189 new PollableDataHelper('onServiceProvidersChanged', 201 new PollableDataHelper('onServiceProvidersChanged',
190 this.sendGetServiceProviders.bind(this)); 202 this.sendGetServiceProviders.bind(this));
191 } 203 }
192 204
193 // Cache of the data received. 205 // Cache of the data received.
194 this.numPassivelyCapturedEvents_ = 0; 206 this.numPassivelyCapturedEvents_ = 0;
195 this.capturedEvents_ = []; 207 this.capturedEvents_ = [];
196 208
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 }; 306 };
295 307
296 BrowserBridge.prototype.sendGetSocketPoolInfo = function() { 308 BrowserBridge.prototype.sendGetSocketPoolInfo = function() {
297 chrome.send('getSocketPoolInfo'); 309 chrome.send('getSocketPoolInfo');
298 }; 310 };
299 311
300 BrowserBridge.prototype.sendGetSpdySessionInfo = function() { 312 BrowserBridge.prototype.sendGetSpdySessionInfo = function() {
301 chrome.send('getSpdySessionInfo'); 313 chrome.send('getSpdySessionInfo');
302 }; 314 };
303 315
316 BrowserBridge.prototype.sendGetSpdyStatus = function() {
317 chrome.send('getSpdyStatus');
318 };
319
320 BrowserBridge.prototype.sendGetSpdyAlternateProtocolMappings = function() {
321 chrome.send('getSpdyAlternateProtocolMappings');
322 };
323
304 BrowserBridge.prototype.sendGetServiceProviders = function() { 324 BrowserBridge.prototype.sendGetServiceProviders = function() {
305 chrome.send('getServiceProviders'); 325 chrome.send('getServiceProviders');
306 }; 326 };
307 327
308 BrowserBridge.prototype.enableIPv6 = function() { 328 BrowserBridge.prototype.enableIPv6 = function() {
309 chrome.send('enableIPv6'); 329 chrome.send('enableIPv6');
310 }; 330 };
311 331
312 BrowserBridge.prototype.setLogLevel = function(logLevel) { 332 BrowserBridge.prototype.setLogLevel = function(logLevel) {
313 chrome.send('setLogLevel', ['' + logLevel]); 333 chrome.send('setLogLevel', ['' + logLevel]);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 }; 403 };
384 404
385 BrowserBridge.prototype.receivedSocketPoolInfo = function(socketPoolInfo) { 405 BrowserBridge.prototype.receivedSocketPoolInfo = function(socketPoolInfo) {
386 this.pollableDataHelpers_.socketPoolInfo.update(socketPoolInfo); 406 this.pollableDataHelpers_.socketPoolInfo.update(socketPoolInfo);
387 }; 407 };
388 408
389 BrowserBridge.prototype.receivedSpdySessionInfo = function(spdySessionInfo) { 409 BrowserBridge.prototype.receivedSpdySessionInfo = function(spdySessionInfo) {
390 this.pollableDataHelpers_.spdySessionInfo.update(spdySessionInfo); 410 this.pollableDataHelpers_.spdySessionInfo.update(spdySessionInfo);
391 }; 411 };
392 412
413 BrowserBridge.prototype.receivedSpdyStatus = function(spdyStatus) {
414 this.pollableDataHelpers_.spdyStatus.update(spdyStatus);
415 };
416
417 BrowserBridge.prototype.receivedSpdyAlternateProtocolMappings =
418 function(spdyAlternateProtocolMappings) {
419 this.pollableDataHelpers_.spdyAlternateProtocolMappings.update(
420 spdyAlternateProtocolMappings);
421 };
422
393 BrowserBridge.prototype.receivedServiceProviders = function(serviceProviders) { 423 BrowserBridge.prototype.receivedServiceProviders = function(serviceProviders) {
394 this.pollableDataHelpers_.serviceProviders.update(serviceProviders); 424 this.pollableDataHelpers_.serviceProviders.update(serviceProviders);
395 }; 425 };
396 426
397 BrowserBridge.prototype.receivedPassiveLogEntries = function(entries) { 427 BrowserBridge.prototype.receivedPassiveLogEntries = function(entries) {
398 // Due to an expected race condition, it is possible to receive actively 428 // Due to an expected race condition, it is possible to receive actively
399 // captured log entries before the passively logged entries are received. 429 // captured log entries before the passively logged entries are received.
400 // 430 //
401 // When that happens, we create a copy of the actively logged entries, delete 431 // When that happens, we create a copy of the actively logged entries, delete
402 // all entries, and, after handling all the passively logged entries, add back 432 // all entries, and, after handling all the passively logged entries, add back
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 * Adds a listener of the SPDY info. |observer| will be called back 632 * Adds a listener of the SPDY info. |observer| will be called back
603 * when data is received, through: 633 * when data is received, through:
604 * 634 *
605 * observer.onSpdySessionInfoChanged(spdySessionInfo) 635 * observer.onSpdySessionInfoChanged(spdySessionInfo)
606 */ 636 */
607 BrowserBridge.prototype.addSpdySessionInfoObserver = function(observer) { 637 BrowserBridge.prototype.addSpdySessionInfoObserver = function(observer) {
608 this.pollableDataHelpers_.spdySessionInfo.addObserver(observer); 638 this.pollableDataHelpers_.spdySessionInfo.addObserver(observer);
609 }; 639 };
610 640
611 /** 641 /**
642 * Adds a listener of the SPDY status. |observer| will be called back
643 * when data is received, through:
644 *
645 * observer.onSpdyStatusChanged(spdyStatus)
646 */
647 BrowserBridge.prototype.addSpdyStatusObserver = function(observer) {
648 this.pollableDataHelpers_.spdyStatus.addObserver(observer);
649 };
650
651 /**
652 * Adds a listener of the AlternateProtocolMappings. |observer| will be called
653 * back when data is received, through:
654 *
655 * observer.onSpdyAlternateProtocolMappingsChanged(
656 * spdyAlternateProtocolMappings)
657 */
658 BrowserBridge.prototype.addSpdyAlternateProtocolMappingsObserver =
659 function(observer) {
660 this.pollableDataHelpers_.spdyAlternateProtocolMappings.addObserver(observer);
661 };
662
663 /**
612 * Adds a listener of the service providers info. |observer| will be called 664 * Adds a listener of the service providers info. |observer| will be called
613 * back when data is received, through: 665 * back when data is received, through:
614 * 666 *
615 * observer.onServiceProvidersChanged(serviceProviders) 667 * observer.onServiceProvidersChanged(serviceProviders)
616 */ 668 */
617 BrowserBridge.prototype.addServiceProvidersObserver = function(observer) { 669 BrowserBridge.prototype.addServiceProvidersObserver = function(observer) {
618 this.pollableDataHelpers_.serviceProviders.addObserver(observer); 670 this.pollableDataHelpers_.serviceProviders.addObserver(observer);
619 }; 671 };
620 672
621 /** 673 /**
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 return true; 948 return true;
897 }; 949 };
898 950
899 UpdateAllObserver.prototype.onDataReceived_ = function(helper, name, data) { 951 UpdateAllObserver.prototype.onDataReceived_ = function(helper, name, data) {
900 helper.removeObserver(this); 952 helper.removeObserver(this);
901 --this.observingCount_; 953 --this.observingCount_;
902 this.updatedData_[name] = data; 954 this.updatedData_[name] = data;
903 if (this.observingCount_ == 0) 955 if (this.observingCount_ == 0)
904 this.callback_(this.updatedData_); 956 this.callback_(this.updatedData_);
905 }; 957 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/index.html ('k') | chrome/browser/resources/net_internals/spdyview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698