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

Side by Side Diff: chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.h

Issue 969223002: Autofill wallet -- handle several classes of error in unmasking prompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: local Created 5 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
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 CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h"
11 #include "components/autofill/core/browser/autofill_client.h"
11 #include "components/autofill/core/browser/card_unmask_delegate.h" 12 #include "components/autofill/core/browser/card_unmask_delegate.h"
12 #include "components/autofill/core/browser/credit_card.h" 13 #include "components/autofill/core/browser/credit_card.h"
13 14
14 namespace autofill { 15 namespace autofill {
15 16
16 class CardUnmaskPromptView; 17 class CardUnmaskPromptView;
17 18
18 class CardUnmaskPromptControllerImpl : public CardUnmaskPromptController { 19 class CardUnmaskPromptControllerImpl : public CardUnmaskPromptController {
19 public: 20 public:
20 explicit CardUnmaskPromptControllerImpl(content::WebContents* web_contents); 21 explicit CardUnmaskPromptControllerImpl(content::WebContents* web_contents);
21 virtual ~CardUnmaskPromptControllerImpl(); 22 virtual ~CardUnmaskPromptControllerImpl();
22 23
23 // Functions called by ChromeAutofillClient. 24 // Functions called by ChromeAutofillClient.
24 void ShowPrompt(const CreditCard& card, 25 void ShowPrompt(const CreditCard& card,
25 base::WeakPtr<CardUnmaskDelegate> delegate); 26 base::WeakPtr<CardUnmaskDelegate> delegate);
26 // The CVC the user entered went through validation. 27 // The CVC the user entered went through validation.
27 void OnVerificationResult(bool success); 28 void OnVerificationResult(AutofillClient::GetRealPanResult result);
28 29
29 // CardUnmaskPromptController implementation. 30 // CardUnmaskPromptController implementation.
30 void OnUnmaskDialogClosed() override; 31 void OnUnmaskDialogClosed() override;
31 void OnUnmaskResponse(const base::string16& cvc, 32 void OnUnmaskResponse(const base::string16& cvc,
32 const base::string16& exp_month, 33 const base::string16& exp_month,
33 const base::string16& exp_year, 34 const base::string16& exp_year,
34 bool should_store_pan) override; 35 bool should_store_pan) override;
35 36
36 content::WebContents* GetWebContents() override; 37 content::WebContents* GetWebContents() override;
37 base::string16 GetWindowTitle() const override; 38 base::string16 GetWindowTitle() const override;
(...skipping 20 matching lines...) Expand all
58 CardUnmaskDelegate::UnmaskResponse pending_response_; 59 CardUnmaskDelegate::UnmaskResponse pending_response_;
59 60
60 base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_; 61 base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImpl); 63 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImpl);
63 }; 64 };
64 65
65 } // namespace autofill 66 } // namespace autofill
66 67
67 #endif // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ 68 #endif // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698