Chromium Code Reviews| Index: chrome/browser/ui/cocoa/autofill/autofill_layout_view.mm |
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_layout_view.mm b/chrome/browser/ui/cocoa/autofill/autofill_layout_view.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c9c2848906d951d9c7228f38a2b41a9189ca0192 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_layout_view.mm |
| @@ -0,0 +1,29 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import "chrome/browser/ui/cocoa/autofill/autofill_layout_view.h" |
| + |
| +#include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h" |
| + |
| +@implementation AutofillLayoutView |
| + |
| +- (void)setLayoutManager:(SimpleGridLayout*) layout { |
| + layout_.reset(layout); |
| +} |
| + |
| +- (void)setFrame:(NSRect)frame { |
|
sail
2013/05/01 17:12:36
should you override resizeSubviewsWithOldSize inst
groby-ooo-7-16
2013/05/01 20:37:44
Done. (separate CL)
|
| + [super setFrame:frame]; |
| + [self performLayout]; |
| +} |
| + |
| +- (void)performLayout { |
| + layout_->Layout(self); |
| +} |
| + |
| +- (CGFloat)preferredHeightForWidth:(CGFloat)width { |
| + return layout_->GetPreferredHeightForWidth(width); |
| +} |
| + |
| +@end |
| + |