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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_layout.h

Issue 15645004: [rAC] Allow sub-views to trigger layout reflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review issues. 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 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_LAYOUT_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_LAYOUT_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 // Defines a protocol that allows resizing a view hierarchy based on the size
11 // requirements of the subviews. Is implemented by either views or view
12 // controllers.
13 // The way this works together is:
14 // * Subview indicates by calling -requestRelayout on the window controller.
15 // * Window controller queries subviews for preferredSize to determine the
16 // total size of the contentView, adjusts subview origins appropriately,
17 // and calls performLayout on each subview.
18 // * Subviews then recursively do the same thing.
19 @protocol AutofillLayout
20
21 // Query the preferred size, without actually layouting.
22 // Akin to -intrinsicContentSize on 10.7
23 - (NSSize)preferredSize;
24
25 // Layout the content according to the preferred size. Will not touch
26 // frameOrigin. If all objects in the hierarchy were custom views (and not
27 // view controllers), this could be replaced by overriding
28 // -resizeSubviewsWithOldSize:.
29 - (void)performLayout;
30
31 @end
32
33 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_LAYOUT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm ('k') | chrome/browser/ui/cocoa/autofill/autofill_main_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698