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

Unified Diff: chrome/browser/resources/net_internals/main.js

Issue 1593009: Add extra views to the new net internals page. This adds tabs along the top f... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/net_internals/main.js
===================================================================
--- chrome/browser/resources/net_internals/main.js (revision 43430)
+++ chrome/browser/resources/net_internals/main.js (working copy)
@@ -14,27 +14,48 @@
* Main entry point. called once the page has loaded.
*/
function onLoaded() {
- // Layout the various DIVs in a vertically split fashion.
- new LayoutManager("filterBox",
- "requestsBox",
- "actionBox",
- "splitterBox",
- "detailsBox");
-
- // Create the view which displays information on the current selection.
- var detailsView = new DetailsView("detailsLogTabHandle",
- "detailsTimelineTabHandle",
- "detailsTabArea");
-
// Create the view which displays requests lists, and lets you select, filter
// and delete them.
- new RequestsView('requestsListTableBody',
- 'filterInput',
- 'filterCount',
- 'deleteSelected',
- 'selectAll',
- detailsView);
+ var requestsView = new RequestsView('requestsListTableBody',
+ 'filterInput',
+ 'filterCount',
+ 'deleteSelected',
+ 'selectAll',
+ // IDs for the details view.
+ "detailsTabHandles",
+ "detailsLogTab",
+ "detailsTimelineTab",
+ "detailsLogBox",
+ "detailsTimelineBox",
+
+ // IDs for the layout boxes.
+ "filterBox",
+ "requestsBox",
+ "actionBox",
+ "splitterBox");
+
+ // Create a view which lets you tab between the different sub-views.
+ var categoryTabSwitcher =
+ new TabSwitcherView(new DivView('categoryTabHandles'));
+
+ // Populate the main tabs.
+ categoryTabSwitcher.addTab('requestsTab', requestsView);
+ categoryTabSwitcher.addTab('proxyTab', new DivView('proxyTabContent'));
+ categoryTabSwitcher.addTab('dnsTab', new DivView('dnsTabContent'));
+ categoryTabSwitcher.addTab('socketsTab', new DivView('socketsTabContent'));
+ categoryTabSwitcher.addTab('httpCacheTab',
+ new DivView('httpCacheTabContent'));
+
+ // Select the requests tab as the default.
+ categoryTabSwitcher.switchToTab('requestsTab');
+
+ // Make this category tab widget the primary view, that fills the whole page.
+ var windowView = new WindowView(categoryTabSwitcher);
+
+ // Trigger initial layout.
+ windowView.resetGeometry();
+
// Tell the browser that we are ready to start receiving log events.
notifyApplicationReady();
}
« no previous file with comments | « chrome/browser/resources/net_internals/main.css ('k') | chrome/browser/resources/net_internals/requestsview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698