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

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

Issue 6025017: Adds the ability to load JSON log files to about:net-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Put load log button on its own line Created 9 years, 11 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/proxyview.js ('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) 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 * TabSwitcher is an implementation of View that handles tab switching. 6 * TabSwitcher is an implementation of View that handles tab switching.
7 * 7 *
8 * +-----------------------------------+ 8 * +-----------------------------------+
9 * | Tab1 / Tab2 / Tab3 / .. | <- tab handle view 9 * | Tab1 / Tab2 / Tab3 / .. | <- tab handle view
10 * +-----------------------------------+ 10 * +-----------------------------------+
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 g_browser.checkForUpdatedInfo(); 129 g_browser.checkForUpdatedInfo();
130 }; 130 };
131 131
132 TabSwitcherView.prototype.getAllTabIds = function() { 132 TabSwitcherView.prototype.getAllTabIds = function() {
133 var ids = []; 133 var ids = [];
134 for (var i = 0; i < this.tabs_.length; ++i) 134 for (var i = 0; i < this.tabs_.length; ++i)
135 ids.push(this.tabs_[i].id); 135 ids.push(this.tabs_[i].id);
136 return ids; 136 return ids;
137 }; 137 };
138 138
139 // Shows/hides the DOM node that is used to select the tab. Will not change
140 // the active tab.
141 TabSwitcherView.prototype.showTabHandleNode = function(id, isVisible) {
142 var tab = this.findTabById(id);
143 setNodeDisplay(tab.getTabHandleNode(), isVisible);
144 };
145
139 //----------------------------------------------------------------------------- 146 //-----------------------------------------------------------------------------
140 147
141 /** 148 /**
142 * @constructor 149 * @constructor
143 */ 150 */
144 function TabEntry(id, contentView) { 151 function TabEntry(id, contentView) {
145 this.id = id; 152 this.id = id;
146 this.contentView = contentView; 153 this.contentView = contentView;
147 } 154 }
148 155
149 TabEntry.prototype.setSelected = function(isSelected) { 156 TabEntry.prototype.setSelected = function(isSelected) {
150 this.active = isSelected; 157 this.active = isSelected;
151 changeClassName(this.getTabHandleNode(), 'selected', isSelected); 158 changeClassName(this.getTabHandleNode(), 'selected', isSelected);
152 this.contentView.show(isSelected); 159 this.contentView.show(isSelected);
153 }; 160 };
154 161
155 /** 162 /**
156 * Returns the DOM node that is used to select the tab. 163 * Returns the DOM node that is used to select the tab.
157 */ 164 */
158 TabEntry.prototype.getTabHandleNode = function() { 165 TabEntry.prototype.getTabHandleNode = function() {
159 return document.getElementById(this.id); 166 return document.getElementById(this.id);
160 }; 167 };
161 168
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/proxyview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698