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

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

Issue 2602473003: Run tools/clang-format-js on chrome/browser/resources/net_internals (Closed)
Patch Set: drop dep Created 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * Controller and View for switching between tabs. 6 * Controller and View for switching between tabs.
7 * 7 *
8 * The View part of TabSwitcherView displays the contents of the currently 8 * The View part of TabSwitcherView displays the contents of the currently
9 * selected tab (only one tab can be active at a time). 9 * selected tab (only one tab can be active at a time).
10 * 10 *
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // list only after its been populated. 63 // list only after its been populated.
64 var tabListWidth = this.tabListWidth_; 64 var tabListWidth = this.tabListWidth_;
65 if (tabListWidth > width) 65 if (tabListWidth > width)
66 tabListWidth = width; 66 tabListWidth = width;
67 tabListNode.style.position = 'absolute'; 67 tabListNode.style.position = 'absolute';
68 setNodePosition(tabListNode, left, top, tabListWidth, height); 68 setNodePosition(tabListNode, left, top, tabListWidth, height);
69 69
70 // Position each of the tab's content areas. 70 // Position each of the tab's content areas.
71 for (var tabId in this.tabIdToView_) { 71 for (var tabId in this.tabIdToView_) {
72 var view = this.tabIdToView_[tabId]; 72 var view = this.tabIdToView_[tabId];
73 view.setGeometry(left + tabListWidth, top, width - tabListWidth, 73 view.setGeometry(
74 height); 74 left + tabListWidth, top, width - tabListWidth, height);
75 } 75 }
76 }, 76 },
77 77
78 show: function(isVisible) { 78 show: function(isVisible) {
79 superClass.prototype.show.call(this, isVisible); 79 superClass.prototype.show.call(this, isVisible);
80 var activeView = this.getActiveTabView(); 80 var activeView = this.getActiveTabView();
81 if (activeView) 81 if (activeView)
82 activeView.show(isVisible); 82 activeView.show(isVisible);
83 }, 83 },
84 84
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 newView.show(this.isVisible()); 172 newView.show(this.isVisible());
173 173
174 if (this.onTabSwitched_) 174 if (this.onTabSwitched_)
175 this.onTabSwitched_(oldTabId, tabId); 175 this.onTabSwitched_(oldTabId, tabId);
176 }, 176 },
177 }; 177 };
178 178
179 return TabSwitcherView; 179 return TabSwitcherView;
180 })(); 180 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/spdy_view.js ('k') | chrome/browser/resources/net_internals/time_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698