| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SUGGESTION_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SUGGESTION_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SUGGESTION_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SUGGESTION_CONTAINER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" | 11 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" |
| 12 | 12 |
| 13 namespace autofill { | 13 namespace autofill { |
| 14 class AutofillDialogController; | 14 class AutofillDialogViewDelegate; |
| 15 } | 15 } |
| 16 | 16 |
| 17 @class AutofillTextField; | 17 @class AutofillTextField; |
| 18 | 18 |
| 19 // Container for the data suggested for a particular input section. | 19 // Container for the data suggested for a particular input section. |
| 20 @interface AutofillSuggestionContainer : NSViewController<AutofillLayout> { | 20 @interface AutofillSuggestionContainer : NSViewController<AutofillLayout> { |
| 21 @private | 21 @private |
| 22 // The label that holds the suggestion description text. | 22 // The label that holds the suggestion description text. |
| 23 base::scoped_nsobject<NSTextField> label_; | 23 base::scoped_nsobject<NSTextField> label_; |
| 24 | 24 |
| 25 // The second (and longer) line of text that describes the suggestion. | 25 // The second (and longer) line of text that describes the suggestion. |
| 26 base::scoped_nsobject<NSTextField> label2_; | 26 base::scoped_nsobject<NSTextField> label2_; |
| 27 | 27 |
| 28 // The icon that comes just before |label_|. | 28 // The icon that comes just before |label_|. |
| 29 base::scoped_nsobject<NSImageView> iconImageView_; | 29 base::scoped_nsobject<NSImageView> iconImageView_; |
| 30 | 30 |
| 31 // The input set by ShowTextfield. | 31 // The input set by ShowTextfield. |
| 32 base::scoped_nsobject<AutofillTextField> inputField_; | 32 base::scoped_nsobject<AutofillTextField> inputField_; |
| 33 | 33 |
| 34 autofill::AutofillDialogController* controller_; // Not owned. | 34 autofill::AutofillDialogViewDelegate* delegate_; // Not owned. |
| 35 } | 35 } |
| 36 | 36 |
| 37 // Auxiliary textfield. See showTextfield: for details. | 37 // Auxiliary textfield. See showTextfield: for details. |
| 38 @property (readonly, nonatomic) AutofillTextField* inputField; | 38 @property (readonly, nonatomic) AutofillTextField* inputField; |
| 39 | 39 |
| 40 // Set the icon for the suggestion. | 40 // Set the icon for the suggestion. |
| 41 - (void)setIcon:(NSImage*)iconImage; | 41 - (void)setIcon:(NSImage*)iconImage; |
| 42 | 42 |
| 43 // Set the main suggestion text and the font used to render that text. | 43 // Set the main suggestion text and the font used to render that text. |
| 44 - (void)setSuggestionText:(NSString*)line1 | 44 - (void)setSuggestionText:(NSString*)line1 |
| 45 line2:(NSString*)line2 | 45 line2:(NSString*)line2 |
| 46 withFont:(NSFont*)font; | 46 withFont:(NSFont*)font; |
| 47 | 47 |
| 48 // Shows an auxiliary textfield to the right of the suggestion icon and | 48 // Shows an auxiliary textfield to the right of the suggestion icon and |
| 49 // text. This is currently only used to show a CVC field for the CC section. | 49 // text. This is currently only used to show a CVC field for the CC section. |
| 50 - (void)showInputField:(NSString*)text withIcon:(NSImage*)icon; | 50 - (void)showInputField:(NSString*)text withIcon:(NSImage*)icon; |
| 51 | 51 |
| 52 @end | 52 @end |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SUGGESTION_CONTAINER_H_ | 54 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SUGGESTION_CONTAINER_H_ |
| OLD | NEW |