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/memory/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 AutofillDialogController; |
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 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 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 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 scoped_nsobject<AutofillTextField> inputField_; | 32 base::scoped_nsobject<AutofillTextField> inputField_; |
33 | 33 |
34 autofill::AutofillDialogController* controller_; // Not owned. | 34 autofill::AutofillDialogController* controller_; // Not owned. |
35 } | 35 } |
36 | 36 |
37 // Set the icon for the suggestion. | 37 // Set the icon for the suggestion. |
38 - (void)setIcon:(NSImage*)iconImage; | 38 - (void)setIcon:(NSImage*)iconImage; |
39 | 39 |
40 // Set the main suggestion text and the font used to render that text. | 40 // Set the main suggestion text and the font used to render that text. |
41 - (void)setSuggestionText:(NSString*)line1 | 41 - (void)setSuggestionText:(NSString*)line1 |
42 line2:(NSString*)line2 | 42 line2:(NSString*)line2 |
43 withFont:(NSFont*)font; | 43 withFont:(NSFont*)font; |
44 | 44 |
45 // Turns editable textfield on, setting the field's placeholder text and icon. | 45 // Turns editable textfield on, setting the field's placeholder text and icon. |
46 - (void)showTextfield:(NSString*)text withIcon:(NSImage*)icon; | 46 - (void)showTextfield:(NSString*)text withIcon:(NSImage*)icon; |
47 | 47 |
48 @end | 48 @end |
49 | 49 |
50 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SUGGESTION_CONTAINER_H_ | 50 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SUGGESTION_CONTAINER_H_ |
OLD | NEW |