OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_TAB_MANAGER_DELEGATE_H_ | |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_TAB_MANAGER_DELEGATE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/callback.h" | |
11 #include "base/memory/weak_ptr.h" | |
12 #include "base/strings/string16.h" | |
13 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | |
14 #include "components/autofill/content/browser/autocheckout_steps.h" | |
15 #include "components/autofill/core/browser/form_structure.h" | |
16 | |
17 class GURL; | |
18 | |
19 namespace content { | |
20 class WebContents; | |
21 } | |
22 | |
23 namespace user_prefs { | |
24 class PrefRegistrySyncable; | |
25 } | |
26 | |
27 namespace autofill { | |
28 | |
29 // TODO(aruslan): name and description; should be moved into a separate .h. | |
aruslan
2013/07/31 02:43:19
Description.
aruslan
2013/08/07 23:17:03
Done.
| |
30 class AutofillDialogTabManagerDelegate { | |
Evan Stade
2013/08/01 19:44:52
this name is super confusing. Should be AutofillDi
aruslan
2013/08/07 23:17:03
Done.
| |
31 public: | |
32 virtual ~AutofillDialogTabManagerDelegate(); | |
33 | |
34 static base::WeakPtr<AutofillDialogTabManagerDelegate> Create( | |
aruslan
2013/07/31 02:43:19
Description
aruslan
2013/08/07 23:17:03
Done.
| |
35 content::WebContents* contents, | |
36 const FormData& form_structure, | |
37 const GURL& source_url, | |
38 const DialogType dialog_type, | |
39 const base::Callback<void(const FormStructure*, | |
40 const std::string&)>& callback); | |
41 | |
42 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | |
aruslan
2013/07/31 02:43:19
Description.
aruslan
2013/08/07 23:17:03
Done.
| |
43 | |
44 virtual void Show() = 0; | |
aruslan
2013/07/31 02:43:19
Descriptions.
aruslan
2013/08/07 23:17:03
Done.
| |
45 virtual void Hide() = 0; | |
46 | |
47 // Called when the tab hosting this dialog is activated by a user gesture. | |
48 // Used to trigger a refresh of the user's Wallet data. | |
49 virtual void TabActivated() = 0; | |
50 | |
51 // Adds a step in the flow to the Autocheckout UI. | |
52 virtual void AddAutocheckoutStep(AutocheckoutStepType step_type) = 0; | |
53 | |
54 // Updates the status of a step in the Autocheckout UI. | |
55 virtual void UpdateAutocheckoutStep( | |
56 AutocheckoutStepType step_type, | |
57 AutocheckoutStepStatus step_status) = 0; | |
58 | |
59 // Called when there is an error in an active Autocheckout flow. | |
60 virtual void OnAutocheckoutError() = 0; | |
61 | |
62 // Called when an Autocheckout flow completes successfully. | |
63 virtual void OnAutocheckoutSuccess() = 0; | |
64 | |
65 virtual DialogType GetDialogType() const = 0; | |
aruslan
2013/07/31 02:43:19
Description.
aruslan
2013/08/07 23:17:03
Done.
| |
66 }; | |
67 | |
68 } // namespace autofill | |
69 | |
70 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_TAB_MANAGER_DELEGATE_H_ | |
OLD | NEW |