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

Side by Side Diff: components/autofill/core/browser/autofill_client.h

Issue 710453002: [Autofill] Componentize AutofillCCInfoBarDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove infobar if its associated page content is destroyed. Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_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/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 14
15 namespace content { 15 namespace content {
16 class RenderFrameHost; 16 class RenderFrameHost;
17 } 17 }
18 18
19 namespace gfx { 19 namespace gfx {
20 class Rect; 20 class Rect;
21 class RectF; 21 class RectF;
22 } 22 }
23 23
24 class GURL; 24 class GURL;
25 class PrefService; 25 class PrefService;
26 26
27 namespace autofill { 27 namespace autofill {
28 28
29 class AutofillDriver;
29 class AutofillPopupDelegate; 30 class AutofillPopupDelegate;
30 class AutofillWebDataService; 31 class AutofillWebDataService;
31 class CreditCard; 32 class CreditCard;
32 class FormStructure; 33 class FormStructure;
33 class PersonalDataManager; 34 class PersonalDataManager;
34 struct FormData; 35 struct FormData;
35 struct Suggestion; 36 struct Suggestion;
36 37
37 // A client interface that needs to be supplied to the Autofill component by the 38 // A client interface that needs to be supplied to the Autofill component by the
38 // embedder. 39 // embedder.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Hides the associated request autocomplete dialog (if it exists). 74 // Hides the associated request autocomplete dialog (if it exists).
74 virtual void HideRequestAutocompleteDialog() = 0; 75 virtual void HideRequestAutocompleteDialog() = 0;
75 76
76 // Causes the Autofill settings UI to be shown. 77 // Causes the Autofill settings UI to be shown.
77 virtual void ShowAutofillSettings() = 0; 78 virtual void ShowAutofillSettings() = 0;
78 79
79 // A user has attempted to use a masked card. Prompt them for further 80 // A user has attempted to use a masked card. Prompt them for further
80 // information to proceed. 81 // information to proceed.
81 virtual void ShowUnmaskPrompt() = 0; 82 virtual void ShowUnmaskPrompt() = 0;
82 83
83 // Run |save_card_callback| if the credit card should be imported as personal 84 // Opens an infobar to prompt the user to save credit card details.
84 // data. |metric_logger| can be used to log user actions.
85 virtual void ConfirmSaveCreditCard( 85 virtual void ConfirmSaveCreditCard(
86 AutofillDriver* autofill_driver,
86 const base::Closure& save_card_callback) = 0; 87 const base::Closure& save_card_callback) = 0;
87 88
88 // Returns true if both the platform and the device support scanning credit 89 // Returns true if both the platform and the device support scanning credit
89 // cards. Should be called before ScanCreditCard(). 90 // cards. Should be called before ScanCreditCard().
90 virtual bool HasCreditCardScanFeature() = 0; 91 virtual bool HasCreditCardScanFeature() = 0;
91 92
92 // Shows the user interface for scanning a credit card. Invokes the |callback| 93 // Shows the user interface for scanning a credit card. Invokes the |callback|
93 // when a credit card is scanned successfully. Should be called only if 94 // when a credit card is scanned successfully. Should be called only if
94 // HasCreditCardScanFeature() returns true. 95 // HasCreditCardScanFeature() returns true.
95 virtual void ScanCreditCard(const CreditCardScanCallback& callback) = 0; 96 virtual void ScanCreditCard(const CreditCardScanCallback& callback) = 0;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 const base::string16& autofilled_value, 132 const base::string16& autofilled_value,
132 const base::string16& profile_full_name) = 0; 133 const base::string16& profile_full_name) = 0;
133 134
134 // Informs the client that a user gesture has been observed. 135 // Informs the client that a user gesture has been observed.
135 virtual void OnFirstUserGestureObserved() = 0; 136 virtual void OnFirstUserGestureObserved() = 0;
136 }; 137 };
137 138
138 } // namespace autofill 139 } // namespace autofill
139 140
140 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ 141 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698