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

Unified Diff: chrome/browser/ui/cocoa/layout_view.h

Issue 14646021: [Autofill] Add basic version of GridLayout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/layout_view.mm » ('j') | chrome/browser/ui/cocoa/layout_view.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/layout_view.h
diff --git a/chrome/browser/ui/cocoa/layout_view.h b/chrome/browser/ui/cocoa/layout_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..6502ab2e62f550f10c8145dd52d90f0bd138ad1a
--- /dev/null
+++ b/chrome/browser/ui/cocoa/layout_view.h
@@ -0,0 +1,34 @@
+// 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.
+
+#ifndef CHROME_BROWSER_UI_COCOA_LAYOUT_VIEW_H_
+#define CHROME_BROWSER_UI_COCOA_LAYOUT_VIEW_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/memory/scoped_ptr.h"
+
+class SimpleGridLayout;
+
+// A view that carries its own layout manager. Re-layouts on setFrame:.
+@interface LayoutView : NSView {
+ @private
+ scoped_ptr<SimpleGridLayout> layout_;
+}
+
+// Sets a layout manager and takes ownership of it.
+- (void)setLayoutManager:(scoped_ptr<SimpleGridLayout>) layout;
Robert Sesek 2013/05/02 20:16:46 nit: no space after )
groby-ooo-7-16 2013/05/03 04:31:46 Done.
+
+// Return a pointer to layout manager, still owned by the view.
+- (SimpleGridLayout*)layoutManager;
+
+// Re-layout subviews according to layout manager.
+- (void)performLayout;
+
+// Query the layout manager for the best height for specified |width|.
+- (CGFloat)preferredHeightForWidth:(CGFloat)width;
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_LAYOUT_VIEW_H_
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/layout_view.mm » ('j') | chrome/browser/ui/cocoa/layout_view.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698