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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/layout_view.mm

Issue 14646021: [Autofill] Add basic version of GridLayout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move back to old location, add bug for Grand Unified Layout Created 7 years, 7 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 #import "chrome/browser/ui/cocoa/autofill/layout_view.h"
6
7 #include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h"
8
9 @implementation LayoutView
10
11 - (void)setLayoutManager:(scoped_ptr<SimpleGridLayout>)layout {
12 layout_ = layout.Pass();
13 }
14
15 - (SimpleGridLayout*)layoutManager {
16 return layout_.get();
17 }
18
19 - (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
20 [super resizeSubviewsWithOldSize:oldBoundsSize];
21 [self performLayout];
22 }
23
24 - (void)performLayout {
25 layout_->Layout(self);
26 }
27
28 - (CGFloat)preferredHeightForWidth:(CGFloat)width {
29 return layout_->GetPreferredHeightForWidth(width);
30 }
31
32 @end
33
Robert Sesek 2013/05/13 22:15:08 nit: extra blank line
groby-ooo-7-16 2013/05/13 22:40:11 Done.
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/layout_view.h ('k') | chrome/browser/ui/cocoa/autofill/layout_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698