Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: chrome/browser/autofill/autofill_manager_delegate.h

Issue 12378055: Make autofill stop depending on InfoBarService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify test Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 13
14 namespace autofill { 14 namespace autofill {
15 class PasswordGenerator; 15 class PasswordGenerator;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 struct PasswordForm; 19 struct PasswordForm;
20 struct SSLStatus; 20 struct SSLStatus;
21 } 21 }
22 22
23 namespace gfx { 23 namespace gfx {
24 class Rect; 24 class Rect;
25 class RectF; 25 class RectF;
26 } 26 }
27 27
28 class AutofillMetrics; 28 class AutofillMetrics;
29 class AutofillPopupDelegate; 29 class AutofillPopupDelegate;
30 class CreditCard;
30 class FormStructure; 31 class FormStructure;
31 class GURL; 32 class GURL;
32 class InfoBarService; 33 class InfoBarService;
33 class PersonalDataManager; 34 class PersonalDataManager;
34 class PrefService; 35 class PrefService;
35 class ProfileSyncServiceBase; 36 class ProfileSyncServiceBase;
36 37
37 struct FormData; 38 struct FormData;
38 39
39 namespace autofill { 40 namespace autofill {
(...skipping 10 matching lines...) Expand all
50 // 51 //
51 // Each delegate instance is associated with a given context within 52 // Each delegate instance is associated with a given context within
52 // which an AutofillManager is used (e.g. a single tab), so when we 53 // which an AutofillManager is used (e.g. a single tab), so when we
53 // say "for the delegate" below, we mean "in the execution context the 54 // say "for the delegate" below, we mean "in the execution context the
54 // delegate is associated with" (e.g. for the tab the AutofillManager is 55 // delegate is associated with" (e.g. for the tab the AutofillManager is
55 // attached to). 56 // attached to).
56 class AutofillManagerDelegate { 57 class AutofillManagerDelegate {
57 public: 58 public:
58 virtual ~AutofillManagerDelegate() {} 59 virtual ~AutofillManagerDelegate() {}
59 60
60 // Gets the infobar service associated with the delegate.
61 virtual InfoBarService* GetInfoBarService() = 0;
62
63 // Gets the PersonalDataManager instance associated with the delegate. 61 // Gets the PersonalDataManager instance associated with the delegate.
64 virtual PersonalDataManager* GetPersonalDataManager() = 0; 62 virtual PersonalDataManager* GetPersonalDataManager() = 0;
65 63
66 // Gets the preferences associated with the delegate. 64 // Gets the preferences associated with the delegate.
67 virtual PrefService* GetPrefs() = 0; 65 virtual PrefService* GetPrefs() = 0;
68 66
69 // Gets the profile sync service associated with the delegate. Will 67 // Gets the profile sync service associated with the delegate. Will
70 // be NULL if sync is not enabled. 68 // be NULL if sync is not enabled.
71 virtual ProfileSyncServiceBase* GetProfileSyncService() = 0; 69 virtual ProfileSyncServiceBase* GetProfileSyncService() = 0;
72 70
73 // Hides the associated request autocomplete dialog (if it exists). 71 // Hides the associated request autocomplete dialog (if it exists).
74 virtual void HideRequestAutocompleteDialog() = 0; 72 virtual void HideRequestAutocompleteDialog() = 0;
75 73
76 // Returns true if saving passwords is currently enabled for the 74 // Returns true if saving passwords is currently enabled for the
77 // delegate. 75 // delegate.
78 virtual bool IsSavingPasswordsEnabled() const = 0; 76 virtual bool IsSavingPasswordsEnabled() const = 0;
79 77
80 // Causes an error explaining that Autocheckout has failed to be displayed to 78 // Causes an error explaining that Autocheckout has failed to be displayed to
81 // the user. 79 // the user.
82 virtual void OnAutocheckoutError() = 0; 80 virtual void OnAutocheckoutError() = 0;
83 81
84 // Causes the Autofill settings UI to be shown. 82 // Causes the Autofill settings UI to be shown.
85 virtual void ShowAutofillSettings() = 0; 83 virtual void ShowAutofillSettings() = 0;
86 84
85 // Run |import_callback| if the credit card should be imported as personal
86 // data. |metric_logger| can be used to log user actions.
87 virtual void ConfirmImportCC(const AutofillMetrics& metric_logger,
Ilya Sherman 2013/03/06 09:13:24 nit: Please name this something closer to "Confirm
kaiwang 2013/03/06 18:25:04 Done.
88 const CreditCard& credit_card,
89 const base::Closure& import_callback) = 0;
90
87 // Causes the password generation bubble UI to be shown using the 91 // Causes the password generation bubble UI to be shown using the
88 // specified form with the given bounds. 92 // specified form with the given bounds.
89 virtual void ShowPasswordGenerationBubble( 93 virtual void ShowPasswordGenerationBubble(
90 const gfx::Rect& bounds, 94 const gfx::Rect& bounds,
91 const content::PasswordForm& form, 95 const content::PasswordForm& form,
92 autofill::PasswordGenerator* generator) = 0; 96 autofill::PasswordGenerator* generator) = 0;
93 97
94 // Causes the Autocheckout bubble UI to be displayed. |bounding_box| is the 98 // Causes the Autocheckout bubble UI to be displayed. |bounding_box| is the
95 // anchor for the bubble. |native_view| is the parent view of the bubble. 99 // anchor for the bubble. |native_view| is the parent view of the bubble.
96 // |callback| is run if the bubble is accepted. 100 // |callback| is run if the bubble is accepted.
(...skipping 28 matching lines...) Expand all
125 // Hide the Autofill popup if one is currently showing. 129 // Hide the Autofill popup if one is currently showing.
126 virtual void HideAutofillPopup() = 0; 130 virtual void HideAutofillPopup() = 0;
127 131
128 // Updates the Autocheckout progress bar. |value| must be in [0.0, 1.0]. 132 // Updates the Autocheckout progress bar. |value| must be in [0.0, 1.0].
129 virtual void UpdateProgressBar(double value) = 0; 133 virtual void UpdateProgressBar(double value) = 0;
130 }; 134 };
131 135
132 } // namespace autofill 136 } // namespace autofill
133 137
134 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_ 138 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698