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

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

Issue 7530020: Re-design the "data" tab on about:net-internals. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address mmenke's comments Created 9 years, 4 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
« no previous file with comments | « chrome/browser/resources/net_internals/main.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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, updated on load log). 6 * Dictionary of constants (initialized by browser, updated on load log).
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // Populate the main tabs. Even tabs that don't contain information for the 71 // Populate the main tabs. Even tabs that don't contain information for the
72 // running OS should be created, so they can load log dumps from other 72 // running OS should be created, so they can load log dumps from other
73 // OSes. 73 // OSes.
74 categoryTabSwitcher.addTab('eventsTab', new EventsView(), false, true); 74 categoryTabSwitcher.addTab('eventsTab', new EventsView(), false, true);
75 categoryTabSwitcher.addTab('proxyTab', new ProxyView(), false, true); 75 categoryTabSwitcher.addTab('proxyTab', new ProxyView(), false, true);
76 categoryTabSwitcher.addTab('dnsTab', new DnsView(), false, true); 76 categoryTabSwitcher.addTab('dnsTab', new DnsView(), false, true);
77 categoryTabSwitcher.addTab('socketsTab', new SocketsView(), false, true); 77 categoryTabSwitcher.addTab('socketsTab', new SocketsView(), false, true);
78 categoryTabSwitcher.addTab('spdyTab', new SpdyView(), false, true); 78 categoryTabSwitcher.addTab('spdyTab', new SpdyView(), false, true);
79 categoryTabSwitcher.addTab('httpCacheTab', new HttpCacheView(), false, true); 79 categoryTabSwitcher.addTab('httpCacheTab', new HttpCacheView(), false, true);
80 categoryTabSwitcher.addTab('dataTab', new DataView(), false, true); 80 categoryTabSwitcher.addTab('importTab', new ImportView(), false, true);
81 categoryTabSwitcher.addTab('exportTab', new ExportView(), false, true);
82 categoryTabSwitcher.addTab('captureTab', new CaptureView(), false, true);
81 categoryTabSwitcher.addTab('serviceProvidersTab', new ServiceProvidersView(), 83 categoryTabSwitcher.addTab('serviceProvidersTab', new ServiceProvidersView(),
82 false, cr.isWindows); 84 false, cr.isWindows);
83 categoryTabSwitcher.addTab('testTab', new TestView(), false, true); 85 categoryTabSwitcher.addTab('testTab', new TestView(), false, true);
84 categoryTabSwitcher.addTab('hstsTab', new HSTSView(), false, true); 86 categoryTabSwitcher.addTab('hstsTab', new HSTSView(), false, true);
85 categoryTabSwitcher.addTab('httpThrottlingTab', new HttpThrottlingView(), 87 categoryTabSwitcher.addTab('httpThrottlingTab', new HttpThrottlingView(),
86 false, true); 88 false, true);
87 categoryTabSwitcher.addTab('logsTab', new LogsView(), false, 89 categoryTabSwitcher.addTab('logsTab', new LogsView(), false,
88 cr.isChromeOS); 90 cr.isChromeOS);
89 categoryTabSwitcher.addTab('prerenderTab', new PrerenderView(), false, true); 91 categoryTabSwitcher.addTab('prerenderTab', new PrerenderView(), false, true);
90 92
91 // Build a map from the anchor name of each tab handle to its "tab ID". 93 // Build a map from the anchor name of each tab handle to its "tab ID".
92 // We will consider navigations to the #hash as a switch tab request. 94 // We will consider navigations to the #hash as a switch tab request.
93 var anchorMap = {}; 95 var anchorMap = {};
94 var tabIds = categoryTabSwitcher.getAllTabIds(); 96 var tabIds = categoryTabSwitcher.getAllTabIds();
95 for (var i = 0; i < tabIds.length; ++i) { 97 for (var i = 0; i < tabIds.length; ++i) {
96 var aNode = $(tabIds[i]); 98 var aNode = $(tabIds[i]);
97 anchorMap[aNode.hash] = tabIds[i]; 99 anchorMap[aNode.hash] = tabIds[i];
98 } 100 }
99 // Default the empty hash to the data tab. 101 // Default the empty hash to the data tab.
100 anchorMap['#'] = anchorMap[''] = 'dataTab'; 102 anchorMap['#'] = anchorMap[''] = 'exportTab';
101 103
102 window.onhashchange = onUrlHashChange.bind(null, anchorMap); 104 window.onhashchange = onUrlHashChange.bind(null, anchorMap);
103 105
104 // Cut out a small vertical strip at the top of the window, to display 106 // Cut out a small vertical strip at the top of the window, to display
105 // a high level status (i.e. if we are capturing events, or displaying a 107 // a high level status (i.e. if we are capturing events, or displaying a
106 // log file). Below it we will position the main tabs and their content 108 // log file). Below it we will position the main tabs and their content
107 // area. 109 // area.
108 var statusView = new DivView('statusViewId'); 110 var statusView = new DivView('statusViewId');
109 var verticalSplitView = new VerticalSplitView(statusView, 111 var verticalSplitView = new VerticalSplitView(statusView,
110 tabSwitcherSplitView); 112 tabSwitcherSplitView);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 437 }
436 } 438 }
437 439
438 if (!parsedDump) 440 if (!parsedDump)
439 return 'Unable to parse log dump as JSON file.'; 441 return 'Unable to parse log dump as JSON file.';
440 return loadLogDump(parsedDump, fileName); 442 return loadLogDump(parsedDump, fileName);
441 }; 443 };
442 444
443 // End of anonymous namespace. 445 // End of anonymous namespace.
444 })(); 446 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/main.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698