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
3 // found in the LICENSE file.
5 #include "components/autofill/core/browser/test_autofill_client.h"
7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
11 TestAutofillClient::TestAutofillClient()
12 : token_service_(new FakeOAuth2TokenService()),
13 identity_provider_(new FakeIdentityProvider(token_service_
.get())) {
15 TestAutofillClient::~TestAutofillClient() {
18 PersonalDataManager
* TestAutofillClient::GetPersonalDataManager() {
22 scoped_refptr
<AutofillWebDataService
> TestAutofillClient::GetDatabase() {
23 return scoped_refptr
<AutofillWebDataService
>(nullptr);
26 PrefService
* TestAutofillClient::GetPrefs() {
30 IdentityProvider
* TestAutofillClient::GetIdentityProvider() {
31 return identity_provider_
.get();
34 void TestAutofillClient::HideRequestAutocompleteDialog() {
37 void TestAutofillClient::ShowAutofillSettings() {
40 void TestAutofillClient::ShowUnmaskPrompt(
41 const CreditCard
& card
,
42 base::WeakPtr
<CardUnmaskDelegate
> delegate
) {
45 void TestAutofillClient::OnUnmaskVerificationResult(GetRealPanResult result
) {
48 void TestAutofillClient::ConfirmSaveCreditCard(
49 const base::Closure
& save_card_callback
) {
52 bool TestAutofillClient::HasCreditCardScanFeature() {
56 void TestAutofillClient::ScanCreditCard(
57 const CreditCardScanCallback
& callback
) {
60 void TestAutofillClient::ShowRequestAutocompleteDialog(
62 content::RenderFrameHost
* rfh
,
63 const ResultCallback
& callback
) {
66 void TestAutofillClient::ShowAutofillPopup(
67 const gfx::RectF
& element_bounds
,
68 base::i18n::TextDirection text_direction
,
69 const std::vector
<Suggestion
>& suggestions
,
70 base::WeakPtr
<AutofillPopupDelegate
> delegate
) {
73 void TestAutofillClient::UpdateAutofillPopupDataListValues(
74 const std::vector
<base::string16
>& values
,
75 const std::vector
<base::string16
>& labels
) {
78 void TestAutofillClient::HideAutofillPopup() {
81 bool TestAutofillClient::IsAutocompleteEnabled() {
85 void TestAutofillClient::DetectAccountCreationForms(
86 content::RenderFrameHost
* rfh
,
87 const std::vector
<autofill::FormStructure
*>& forms
) {
90 void TestAutofillClient::DidFillOrPreviewField(
91 const base::string16
& autofilled_value
,
92 const base::string16
& profile_full_name
) {
95 void TestAutofillClient::OnFirstUserGestureObserved() {
98 void TestAutofillClient::LinkClicked(const GURL
& url
,
99 WindowOpenDisposition disposition
) {
102 } // namespace autofill