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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" |
9 | 9 |
10 namespace autofill { | 10 namespace autofill { |
11 | 11 |
12 // An interface for the dialog that appears when a site initiates an Autofill | 12 // An interface for the dialog that appears when a site initiates an Autofill |
13 // action via the imperative autocomplete API. | 13 // action via the imperative autocomplete API. |
14 class AutofillDialogView { | 14 class AutofillDialogView { |
15 public: | 15 public: |
16 virtual ~AutofillDialogView(); | 16 virtual ~AutofillDialogView(); |
17 | 17 |
18 // Shows the dialog. | 18 // Shows the dialog. |
19 virtual void Show() = 0; | 19 virtual void Show() = 0; |
20 | 20 |
21 // Called when the contents of a section have changed. | 21 // Called when the contents of a section have changed. |
22 virtual void UpdateSection(DialogSection section) = 0; | 22 virtual void UpdateSection(DialogSection section) = 0; |
23 | 23 |
24 // Returns the index into the suggestion model for |section|. | |
25 virtual int GetSuggestionSelection(DialogSection section) = 0; | |
26 | |
27 // Fills |output| with data the user manually input. | 24 // Fills |output| with data the user manually input. |
28 virtual void GetUserInput(DialogSection section, DetailOutputMap* output) = 0; | 25 virtual void GetUserInput(DialogSection section, DetailOutputMap* output) = 0; |
29 | 26 |
30 // Returns the state of the "use billing address for shipping" checkbox. | 27 // Returns the state of the "use billing address for shipping" checkbox. |
31 virtual bool UseBillingForShipping() = 0; | 28 virtual bool UseBillingForShipping() = 0; |
32 | 29 |
33 // Factory function to create the dialog (implemented once per view | 30 // Factory function to create the dialog (implemented once per view |
34 // implementation). |controller| will own the created dialog. | 31 // implementation). |controller| will own the created dialog. |
35 static AutofillDialogView* Create(AutofillDialogController* controller); | 32 static AutofillDialogView* Create(AutofillDialogController* controller); |
36 }; | 33 }; |
37 | 34 |
38 } // namespace autofill | 35 } // namespace autofill |
39 | 36 |
40 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ | 37 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ |
OLD | NEW |