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

Side by Side 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, 8 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 LogEntryType = null; 8 var LogEntryType = null;
9 var LogEventType = null; 9 var LogEventType = null;
10 var LogEventPhase = null; 10 var LogEventPhase = null;
11 var LogSourceType = null; 11 var LogSourceType = null;
12 12
13 /** 13 /**
14 * Main entry point. called once the page has loaded. 14 * Main entry point. called once the page has loaded.
15 */ 15 */
16 function onLoaded() { 16 function onLoaded() {
17 // Layout the various DIVs in a vertically split fashion.
18 new LayoutManager("filterBox",
19 "requestsBox",
20 "actionBox",
21 "splitterBox",
22 "detailsBox");
23
24 // Create the view which displays information on the current selection.
25 var detailsView = new DetailsView("detailsLogTabHandle",
26 "detailsTimelineTabHandle",
27 "detailsTabArea");
28
29 // Create the view which displays requests lists, and lets you select, filter 17 // Create the view which displays requests lists, and lets you select, filter
30 // and delete them. 18 // and delete them.
31 new RequestsView('requestsListTableBody', 19 var requestsView = new RequestsView('requestsListTableBody',
32 'filterInput', 20 'filterInput',
33 'filterCount', 21 'filterCount',
34 'deleteSelected', 22 'deleteSelected',
35 'selectAll', 23 'selectAll',
36 detailsView); 24
25 // IDs for the details view.
26 "detailsTabHandles",
27 "detailsLogTab",
28 "detailsTimelineTab",
29 "detailsLogBox",
30 "detailsTimelineBox",
31
32 // IDs for the layout boxes.
33 "filterBox",
34 "requestsBox",
35 "actionBox",
36 "splitterBox");
37
38 // Create a view which lets you tab between the different sub-views.
39 var categoryTabSwitcher =
40 new TabSwitcherView(new DivView('categoryTabHandles'));
41
42 // Populate the main tabs.
43 categoryTabSwitcher.addTab('requestsTab', requestsView);
44 categoryTabSwitcher.addTab('proxyTab', new DivView('proxyTabContent'));
45 categoryTabSwitcher.addTab('dnsTab', new DivView('dnsTabContent'));
46 categoryTabSwitcher.addTab('socketsTab', new DivView('socketsTabContent'));
47 categoryTabSwitcher.addTab('httpCacheTab',
48 new DivView('httpCacheTabContent'));
49
50 // Select the requests tab as the default.
51 categoryTabSwitcher.switchToTab('requestsTab');
52
53 // Make this category tab widget the primary view, that fills the whole page.
54 var windowView = new WindowView(categoryTabSwitcher);
55
56 // Trigger initial layout.
57 windowView.resetGeometry();
37 58
38 // Tell the browser that we are ready to start receiving log events. 59 // Tell the browser that we are ready to start receiving log events.
39 notifyApplicationReady(); 60 notifyApplicationReady();
40 } 61 }
41 62
42 //------------------------------------------------------------------------------ 63 //------------------------------------------------------------------------------
43 // Messages sent to the browser 64 // Messages sent to the browser
44 //------------------------------------------------------------------------------ 65 //------------------------------------------------------------------------------
45 66
46 function notifyApplicationReady() { 67 function notifyApplicationReady() {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 102
82 LogDataProvider.broadcast = function(logEntry) { 103 LogDataProvider.broadcast = function(logEntry) {
83 for (var i = 0; i < this.observers_.length; ++i) { 104 for (var i = 0; i < this.observers_.length; ++i) {
84 this.observers_[i].onLogEntryAdded(logEntry); 105 this.observers_[i].onLogEntryAdded(logEntry);
85 } 106 }
86 }; 107 };
87 108
88 LogDataProvider.addObserver = function(observer) { 109 LogDataProvider.addObserver = function(observer) {
89 this.observers_.push(observer); 110 this.observers_.push(observer);
90 }; 111 };
OLDNEW
« 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