OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "chrome/browser/autofill/field_types.h" | 11 #include "chrome/browser/autofill/field_types.h" |
12 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 12 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| 13 #include "ui/gfx/image/image.h" |
13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
14 | 15 |
15 class Profile; | 16 class Profile; |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 class WebContents; | 19 class WebContents; |
19 struct NativeWebKeyboardEvent; | 20 struct NativeWebKeyboardEvent; |
20 } | 21 } |
21 | 22 |
22 namespace gfx { | 23 namespace gfx { |
(...skipping 30 matching lines...) Expand all Loading... |
53 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) | 54 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) |
54 const = 0; | 55 const = 0; |
55 // Returns the combobox model for inputs of type |type|, or NULL if the input | 56 // Returns the combobox model for inputs of type |type|, or NULL if the input |
56 // should be a text field. | 57 // should be a text field. |
57 virtual ui::ComboboxModel* ComboboxModelForAutofillType( | 58 virtual ui::ComboboxModel* ComboboxModelForAutofillType( |
58 AutofillFieldType type) = 0; | 59 AutofillFieldType type) = 0; |
59 // Returns the model for suggestions for fields that fall under |section|. | 60 // Returns the model for suggestions for fields that fall under |section|. |
60 virtual ui::MenuModel* MenuModelForSection(DialogSection section) = 0; | 61 virtual ui::MenuModel* MenuModelForSection(DialogSection section) = 0; |
61 virtual string16 LabelForSection(DialogSection section) const = 0; | 62 virtual string16 LabelForSection(DialogSection section) const = 0; |
62 virtual string16 SuggestionTextForSection(DialogSection section) = 0; | 63 virtual string16 SuggestionTextForSection(DialogSection section) = 0; |
| 64 virtual gfx::Image SuggestionIconForSection(DialogSection section) = 0; |
63 virtual void EditClickedForSection(DialogSection section) = 0; | 65 virtual void EditClickedForSection(DialogSection section) = 0; |
64 virtual bool InputIsValid(const DetailInput* input, | 66 virtual bool InputIsValid(const DetailInput* input, |
65 const string16& value) = 0; | 67 const string16& value) = 0; |
66 // Called when the user changes the contents of a text field or activates it | 68 // Called when the user changes the contents of a text field or activates it |
67 // (by focusing and then clicking it). |was_edit| is true when the function | 69 // (by focusing and then clicking it). |was_edit| is true when the function |
68 // was called in response to the user editing the text field. | 70 // was called in response to the user editing the text field. |
69 virtual void UserEditedOrActivatedInput(const DetailInput* input, | 71 virtual void UserEditedOrActivatedInput(const DetailInput* input, |
70 DialogSection section, | 72 DialogSection section, |
71 gfx::NativeView parent_view, | 73 gfx::NativeView parent_view, |
72 const gfx::Rect& content_bounds, | 74 const gfx::Rect& content_bounds, |
(...skipping 22 matching lines...) Expand all Loading... |
95 // The web contents that prompted the dialog. | 97 // The web contents that prompted the dialog. |
96 virtual content::WebContents* web_contents() = 0; | 98 virtual content::WebContents* web_contents() = 0; |
97 | 99 |
98 protected: | 100 protected: |
99 virtual ~AutofillDialogController(); | 101 virtual ~AutofillDialogController(); |
100 }; | 102 }; |
101 | 103 |
102 } // namespace autofill | 104 } // namespace autofill |
103 | 105 |
104 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 106 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
OLD | NEW |