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

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

Issue 15645004: [rAC] Allow sub-views to trigger layout reflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now using proper patch base. 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_CONTAINER_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_CONTAINER_H_ 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_CONTAINER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
12 12
13 namespace autofill { 13 namespace autofill {
14 class AutofillDialogController; 14 class AutofillDialogController;
15 } 15 }
16 16
17 @class LayoutView; 17 @class LayoutView;
18 @class MenuButton; 18 @class MenuButton;
19 @class MenuController; 19 @class MenuController;
20 20
21 // View controller for a section of the payment details. Contains a label 21 // View controller for a section of the payment details. Contains a label
22 // describing the section as well as associated inputs and controls. Built 22 // describing the section as well as associated inputs and controls. Built
23 // dynamically based on data retrieved from AutofillDialogController. 23 // dynamically based on data retrieved from AutofillDialogController.
24 @interface AutofillSectionContainer : NSViewController { 24 @interface AutofillSectionContainer : NSViewController {
25 @private 25 @private
26 scoped_nsobject<LayoutView> inputs_; 26 scoped_nsobject<LayoutView> inputs_;
27 scoped_nsobject<MenuButton> suggestButton_; 27 scoped_nsobject<MenuButton> suggestButton_;
28 scoped_nsobject<NSTextField> label_;
29 scoped_nsobject<NSView> view_; // The view for the container.
30
28 scoped_nsobject<MenuController> menuController_; 31 scoped_nsobject<MenuController> menuController_;
29 autofill::DialogSection section_; 32 autofill::DialogSection section_;
30 autofill::AutofillDialogController* controller_; // Not owned. 33 autofill::AutofillDialogController* controller_; // Not owned.
31 } 34 }
32 35
33 @property(readonly, nonatomic) autofill::DialogSection section; 36 @property(readonly, nonatomic) autofill::DialogSection section;
34 37
35 // Designated initializer. Queries |controller| for the list of desired input 38 // Designated initializer. Queries |controller| for the list of desired input
36 // fields for |section|. 39 // fields for |section|.
37 - (id)initWithController:(autofill::AutofillDialogController*)controller 40 - (id)initWithController:(autofill::AutofillDialogController*)controller
38 forSection:(autofill::DialogSection)section; 41 forSection:(autofill::DialogSection)section;
39 42
43 // Determine preferred size for content.
44 - (NSSize)preferredSize;
45
46 // Layout contents according to preferredSize;
47 - (void)performLayout;
48
40 // Populates |output| with mappings from field identification to input value. 49 // Populates |output| with mappings from field identification to input value.
41 - (void)getInputs:(autofill::DetailOutputMap*)output; 50 - (void)getInputs:(autofill::DetailOutputMap*)output;
42 51
43 // Called when the controller-maintained suggestions model has changed. 52 // Called when the controller-maintained suggestions model has changed.
44 - (void)modelChanged; 53 - (void)modelChanged;
45 54
46 @end 55 @end
47 56
48 @interface AutofillSectionContainer (ForTesting) 57 @interface AutofillSectionContainer (ForTesting)
49 - (NSControl*)getField:(autofill::AutofillFieldType)type; 58 - (NSControl*)getField:(autofill::AutofillFieldType)type;
50 @end 59 @end
51 60
52 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_CONTAINER_H_ 61 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698