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

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

Issue 7531005: Rename the net_internals file names to include hyphens. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add some missing files Created 9 years, 4 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/top_mid_bottom_view.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
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * This view stacks three boxes -- one at the top, one at the bottom, and
7 * one that fills the remaining space between those two.
8 *
9 * +----------------------+
10 * | topbar |
11 * +----------------------+
12 * | |
13 * | |
14 * | |
15 * | |
16 * | middlebox |
17 * | |
18 * | |
19 * | |
20 * | |
21 * | |
22 * +----------------------+
23 * | bottombar |
24 * +----------------------+
25 *
26 * @constructor
27 */
28 function TopMidBottomView(topView, midView, bottomView) {
29 View.call(this);
30
31 this.topView_ = topView;
32 this.midView_ = midView;
33 this.bottomView_ = bottomView;
34 }
35
36 inherits(TopMidBottomView, View);
37
38 TopMidBottomView.prototype.setGeometry = function(left, top, width, height) {
39 TopMidBottomView.superClass_.setGeometry.call(this, left, top, width, height);
40
41 // Calculate the vertical split points.
42 var topbarHeight = this.topView_.getHeight();
43 var bottombarHeight = this.bottomView_.getHeight();
44 var middleboxHeight = height - (topbarHeight + bottombarHeight);
45
46 // Position the boxes using calculated split points.
47 this.topView_.setGeometry(left, top, width, topbarHeight);
48 this.midView_.setGeometry(left, this.topView_.getBottom(),
49 width, middleboxHeight);
50 this.bottomView_.setGeometry(left, this.midView_.getBottom(),
51 width, bottombarHeight);
52 };
53
54 TopMidBottomView.prototype.show = function(isVisible) {
55 TopMidBottomView.superClass_.show.call(this, isVisible);
56 this.topView_.show(isVisible);
57 this.midView_.show(isVisible);
58 this.bottomView_.show(isVisible);
59 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/top_mid_bottom_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698