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())),
14 rappor_service_(new rappor::TestRapporService()) {
16 TestAutofillClient::~TestAutofillClient() {
19 PersonalDataManager
* TestAutofillClient::GetPersonalDataManager() {
23 scoped_refptr
<AutofillWebDataService
> TestAutofillClient::GetDatabase() {
24 return scoped_refptr
<AutofillWebDataService
>(nullptr);
27 PrefService
* TestAutofillClient::GetPrefs() {
31 IdentityProvider
* TestAutofillClient::GetIdentityProvider() {
32 return identity_provider_
.get();
35 rappor::RapporService
* TestAutofillClient::GetRapporService() {
36 return rappor_service_
.get();
39 void TestAutofillClient::HideRequestAutocompleteDialog() {
42 void TestAutofillClient::ShowAutofillSettings() {
45 void TestAutofillClient::ShowUnmaskPrompt(
46 const CreditCard
& card
,
47 base::WeakPtr
<CardUnmaskDelegate
> delegate
) {
50 void TestAutofillClient::OnUnmaskVerificationResult(GetRealPanResult result
) {
53 void TestAutofillClient::ConfirmSaveCreditCard(
54 const base::Closure
& save_card_callback
) {
57 bool TestAutofillClient::HasCreditCardScanFeature() {
61 void TestAutofillClient::ScanCreditCard(
62 const CreditCardScanCallback
& callback
) {
65 void TestAutofillClient::ShowRequestAutocompleteDialog(
67 content::RenderFrameHost
* rfh
,
68 const ResultCallback
& callback
) {
71 void TestAutofillClient::ShowAutofillPopup(
72 const gfx::RectF
& element_bounds
,
73 base::i18n::TextDirection text_direction
,
74 const std::vector
<Suggestion
>& suggestions
,
75 base::WeakPtr
<AutofillPopupDelegate
> delegate
) {
78 void TestAutofillClient::UpdateAutofillPopupDataListValues(
79 const std::vector
<base::string16
>& values
,
80 const std::vector
<base::string16
>& labels
) {
83 void TestAutofillClient::HideAutofillPopup() {
86 bool TestAutofillClient::IsAutocompleteEnabled() {
90 void TestAutofillClient::PropagateAutofillPredictions(
91 content::RenderFrameHost
* rfh
,
92 const std::vector
<autofill::FormStructure
*>& forms
) {
95 void TestAutofillClient::DidFillOrPreviewField(
96 const base::string16
& autofilled_value
,
97 const base::string16
& profile_full_name
) {
100 void TestAutofillClient::OnFirstUserGestureObserved() {
103 void TestAutofillClient::LinkClicked(const GURL
& url
,
104 WindowOpenDisposition disposition
) {
107 } // namespace autofill