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

Side by Side Diff: ui/views/layout/fill_layout.cc

Issue 6286013: V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « ui/views/layout/fill_layout.h ('k') | ui/views/layout/layout_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/views/layout/fill_layout.h"
6
7 #include "base/logging.h"
8 #include "ui/views/view.h"
9
10 namespace ui {
11
12 ////////////////////////////////////////////////////////////////////////////////
13 // FillLayout, public:
14
15 FillLayout::FillLayout() {
16 }
17
18 FillLayout::~FillLayout() {
19 }
20
21 ////////////////////////////////////////////////////////////////////////////////
22 // FillLayout, LayoutManager implementation:
23
24 void FillLayout::Layout(View* host) {
25 if (host->child_count() == 0)
26 return;
27
28 View* child = host->GetChildViewAt(0);
29 child->SetBounds(0, 0, host->width(), host->height());
30 }
31
32 gfx::Size FillLayout::GetPreferredSize(View* host) {
33 DCHECK(host->child_count() == 1);
34 return host->GetChildViewAt(0)->GetPreferredSize();
35 }
36
37 } // namespace ui
OLDNEW
« no previous file with comments | « ui/views/layout/fill_layout.h ('k') | ui/views/layout/layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698