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

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

Issue 1525016: Make it possible to switch between views of the new net-internals page by usi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix long lines 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/net_internals/main.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/net_internals/tabswitcherview.js
===================================================================
--- chrome/browser/resources/net_internals/tabswitcherview.js (revision 43897)
+++ chrome/browser/resources/net_internals/tabswitcherview.js (working copy)
@@ -64,15 +64,17 @@
* "tab".
* @param {!View} view The tab's actual contents.
*/
-TabSwitcherView.prototype.addTab = function(id, contentView) {
+TabSwitcherView.prototype.addTab = function(id, contentView, switchOnClick) {
var tab = new TabEntry(id, contentView);
this.tabs_.push(tab);
- // Attach a click handler, used to switch to the tab.
- var self = this;
- tab.getTabHandleNode().onclick = function() {
- self.switchToTab(id);
- };
+ if (switchOnClick) {
+ // Attach a click handler, used to switch to the tab.
+ var self = this;
+ tab.getTabHandleNode().onclick = function() {
+ self.switchToTab(id);
+ };
+ }
// Start tabs off as hidden.
tab.contentView.show(false);
@@ -116,6 +118,13 @@
newTab.setSelected(true);
};
+TabSwitcherView.prototype.getAllTabIds = function() {
+ var ids = [];
+ for (var i = 0; i < this.tabs_.length; ++i)
+ ids.push(this.tabs_[i].id);
+ return ids;
+};
+
//-----------------------------------------------------------------------------
/**
« no previous file with comments | « chrome/browser/resources/net_internals/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698