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. |
| 22 virtual void UpdateSection(DialogSection section) = 0; |
| 23 |
21 // Returns the index into the suggestion model for |section|. | 24 // Returns the index into the suggestion model for |section|. |
22 virtual int GetSuggestionSelection(DialogSection section) = 0; | 25 virtual int GetSuggestionSelection(DialogSection section) = 0; |
23 | 26 |
24 // Fills |output| with data the user manually input. | 27 // Fills |output| with data the user manually input. |
25 virtual void GetUserInput(DialogSection section, DetailOutputMap* output) = 0; | 28 virtual void GetUserInput(DialogSection section, DetailOutputMap* output) = 0; |
26 | 29 |
27 // Returns the state of the "use billing address for shipping" checkbox. | 30 // Returns the state of the "use billing address for shipping" checkbox. |
28 virtual bool UseBillingForShipping() = 0; | 31 virtual bool UseBillingForShipping() = 0; |
29 | 32 |
30 // Factory function to create the dialog (implemented once per view | 33 // Factory function to create the dialog (implemented once per view |
31 // implementation). |controller| will own the created dialog. | 34 // implementation). |controller| will own the created dialog. |
32 static AutofillDialogView* Create(AutofillDialogController* controller); | 35 static AutofillDialogView* Create(AutofillDialogController* controller); |
33 }; | 36 }; |
34 | 37 |
35 } // namespace autofill | 38 } // namespace autofill |
36 | 39 |
37 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ | 40 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ |
OLD | NEW |