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

Unified 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: Rebased. Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_client.h
diff --git a/components/autofill/core/browser/autofill_client.h b/components/autofill/core/browser/autofill_client.h
index 24fca796a804d507bfb0358e3cf3ee35f243f7d1..b91d16e5c9db0e5d26bcb3417eb99bc7e83cad21 100644
--- a/components/autofill/core/browser/autofill_client.h
+++ b/components/autofill/core/browser/autofill_client.h
@@ -21,12 +21,17 @@ class Rect;
class RectF;
}
+namespace infobars {
+class InfoBar;
+}
+
+class ConfirmInfoBarDelegate;
class GURL;
class PrefService;
namespace autofill {
-class AutofillMetrics;
+class AutofillManager;
class AutofillPopupDelegate;
class AutofillWebDataService;
class CreditCard;
@@ -81,8 +86,12 @@ class AutofillClient {
virtual void ShowUnmaskPrompt() = 0;
// Run |save_card_callback| if the credit card should be imported as personal
- // data. |metric_logger| can be used to log user actions.
+ // data. |autofill_manager| is a container for AutofillDriver and
+ // AutofillClient. It lives till the associated web contents persists.
+ // AutofillClient abstracts the InfoBar creation and AutofillDriver is used to
+ // perform navigations to handle any link clicks performed on that InfoBar.
virtual void ConfirmSaveCreditCard(
+ AutofillManager* autofill_manager,
const base::Closure& save_card_callback) = 0;
// Returns true if both the platform and the device support scanning credit
@@ -136,6 +145,10 @@ class AutofillClient {
// Informs the client that a user gesture has been observed.
virtual void OnFirstUserGestureObserved() = 0;
+
+ // Returns the autofill infobar that owns |delegate|.
+ virtual scoped_ptr<infobars::InfoBar> CreateInfoBar(
blundell 2014/12/12 16:03:07 Can't you get rid of this now?
Pritam Nikam 2014/12/12 16:19:57 No. Still the same linker error if I revert this i
+ scoped_ptr<ConfirmInfoBarDelegate> delegate) = 0;
};
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698