summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_dialog_controller_mac.h
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 02:38:39 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 02:38:39 +0000
commit49d40d89f6fd80412661f3c4707076988f5d2c3d (patch)
tree6bfca3ee3a436db0ed0b829c4ef1adaec8c051ae /chrome/browser/autofill/autofill_dialog_controller_mac.h
parent177d7605e55167a48ea1ecd1cc8fd8fe880a62dc (diff)
downloadchromium_src-49d40d89f6fd80412661f3c4707076988f5d2c3d.zip
chromium_src-49d40d89f6fd80412661f3c4707076988f5d2c3d.tar.gz
chromium_src-49d40d89f6fd80412661f3c4707076988f5d2c3d.tar.bz2
AutoFill Profiles dialog handles multi-select and delete on Mac
Changes the AutoFill dialog on Mac to support multi-select and delete of items in the address and credit card table. The "Edit..." button disables when multiple items are selected. Nib changes in AutoFillDialog.xib: (1) Enables multi-select for the table view, (2) binds the enabled state of the "Edit..." button to the new |multipleSelected| property, (3) connects edit button to outlet. BUG=49344 TEST=AutoFillDialogControllerTest.DeleteMultiple. Review URL: http://codereview.chromium.org/3039014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_dialog_controller_mac.h')
-rw-r--r--chrome/browser/autofill/autofill_dialog_controller_mac.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.h b/chrome/browser/autofill/autofill_dialog_controller_mac.h
index 3318443..7a7faa7 100644
--- a/chrome/browser/autofill/autofill_dialog_controller_mac.h
+++ b/chrome/browser/autofill/autofill_dialog_controller_mac.h
@@ -34,6 +34,9 @@ class Profile;
// cards with section headers for both.
IBOutlet AutoFillTableView* tableView_;
+ // Outlet to "Edit..." button. Here for unit testing purposes.
+ IBOutlet NSButton* editButton_;
+
// This observer is passed in by the caller of the dialog. When the dialog
// is dismissed |observer_| is called with new values for the addresses and
// credit cards.
@@ -68,6 +71,10 @@ class Profile;
// "Remove" buttons.
BOOL itemIsSelected_;
+ // State for |multipleSelected| property used in bindings for "Edit..."
+ // button.
+ BOOL multipleSelected_;
+
// Utility object to save and restore dialog position.
scoped_nsobject<WindowSizeAutosaver> sizeSaver_;
@@ -97,6 +104,10 @@ class Profile;
// edit and delete buttons are bound to this property.
@property (nonatomic) BOOL itemIsSelected;
+// Property representing multiple selection state in |tableView_|. Enabled
+// state of edit button is bound to this property.
+@property (nonatomic) BOOL multipleSelected;
+
// Main interface for displaying an application modal AutoFill dialog on screen.
// This class method creates a new |AutoFillDialogController| and runs it as a
// modal dialog. The controller autoreleases itself when the dialog is closed.
@@ -168,6 +179,9 @@ class Profile;
- (AutoFillCreditCardSheetController*)creditCardSheetController;
- (void)selectAddressAtIndex:(size_t)i;
- (void)selectCreditCardAtIndex:(size_t)i;
+- (void)addSelectedAddressAtIndex:(size_t)i;
+- (void)addSelectedCreditCardAtIndex:(size_t)i;
+- (BOOL)editButtonEnabled;
@end
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_MAC_