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

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

Issue 2602473003: Run tools/clang-format-js on chrome/browser/resources/net_internals (Closed)
Patch Set: Created 3 years, 12 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 var TopMidBottomView = (function() { 5 var TopMidBottomView = (function() {
6 'use strict'; 6 'use strict';
7 7
8 // We inherit from View. 8 // We inherit from View.
9 var superClass = View; 9 var superClass = View;
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 var bottombarHeight = 0; 54 var bottombarHeight = 0;
55 if (this.bottomView_) 55 if (this.bottomView_)
56 bottombarHeight = this.bottomView_.getHeight(); 56 bottombarHeight = this.bottomView_.getHeight();
57 var middleboxHeight = height - (topbarHeight + bottombarHeight); 57 var middleboxHeight = height - (topbarHeight + bottombarHeight);
58 if (middleboxHeight < 0) 58 if (middleboxHeight < 0)
59 middleboxHeight = 0; 59 middleboxHeight = 0;
60 60
61 // Position the boxes using calculated split points. 61 // Position the boxes using calculated split points.
62 if (this.topView_) 62 if (this.topView_)
63 this.topView_.setGeometry(left, top, width, topbarHeight); 63 this.topView_.setGeometry(left, top, width, topbarHeight);
64 this.midView_.setGeometry(left, top + topbarHeight, width, 64 this.midView_.setGeometry(
65 middleboxHeight); 65 left, top + topbarHeight, width, middleboxHeight);
66 if (this.bottomView_) { 66 if (this.bottomView_) {
67 this.bottomView_.setGeometry(left, top + topbarHeight + middleboxHeight, 67 this.bottomView_.setGeometry(
68 width, bottombarHeight); 68 left, top + topbarHeight + middleboxHeight, width, bottombarHeight);
69 } 69 }
70 }, 70 },
71 71
72 show: function(isVisible) { 72 show: function(isVisible) {
73 superClass.prototype.show.call(this, isVisible); 73 superClass.prototype.show.call(this, isVisible);
74 if (this.topView_) 74 if (this.topView_)
75 this.topView_.show(isVisible); 75 this.topView_.show(isVisible);
76 this.midView_.show(isVisible); 76 this.midView_.show(isVisible);
77 if (this.bottomView_) 77 if (this.bottomView_)
78 this.bottomView_.show(isVisible); 78 this.bottomView_.show(isVisible);
79 } 79 }
80 }; 80 };
81 81
82 return TopMidBottomView; 82 return TopMidBottomView;
83 })(); 83 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698