| OLD | NEW | 
|   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" | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
|  38   base::string16 GetWindowTitle() const override; |  38   base::string16 GetWindowTitle() const override; | 
|  39   base::string16 GetInstructionsMessage() const override; |  39   base::string16 GetInstructionsMessage() const override; | 
|  40   int GetCvcImageRid() const override; |  40   int GetCvcImageRid() const override; | 
|  41   bool ShouldRequestExpirationDate() const override; |  41   bool ShouldRequestExpirationDate() const override; | 
|  42   bool GetStoreLocallyStartState() const override; |  42   bool GetStoreLocallyStartState() const override; | 
|  43   bool InputCvcIsValid(const base::string16& input_text) const override; |  43   bool InputCvcIsValid(const base::string16& input_text) const override; | 
|  44   bool InputExpirationIsValid(const base::string16& month, |  44   bool InputExpirationIsValid(const base::string16& month, | 
|  45                               const base::string16& year) const override; |  45                               const base::string16& year) const override; | 
|  46  |  46  | 
|  47  protected: |  47  protected: | 
 |  48   // Virtual so tests can suppress it. | 
 |  49   virtual CardUnmaskPromptView* CreateAndShowView(); | 
 |  50   virtual void LoadRiskFingerprint(); | 
 |  51  | 
|  48   virtual void OnDidLoadRiskFingerprint(const std::string& risk_data); |  52   virtual void OnDidLoadRiskFingerprint(const std::string& risk_data); | 
|  49  |  53  | 
|  50   // Exposed for testing. |  54   // Exposed for testing. | 
|  51   CardUnmaskPromptView* view() { return card_unmask_view_; } |  55   CardUnmaskPromptView* view() { return card_unmask_view_; } | 
|  52  |  56  | 
|  53  private: |  57  private: | 
|  54   void LoadRiskFingerprint(); |  58  | 
 |  59   bool AllowsRetry(AutofillClient::GetRealPanResult result); | 
 |  60   void LogOnCloseEvents(); | 
|  55  |  61  | 
|  56   content::WebContents* web_contents_; |  62   content::WebContents* web_contents_; | 
|  57   CreditCard card_; |  63   CreditCard card_; | 
|  58   base::WeakPtr<CardUnmaskDelegate> delegate_; |  64   base::WeakPtr<CardUnmaskDelegate> delegate_; | 
|  59   CardUnmaskPromptView* card_unmask_view_; |  65   CardUnmaskPromptView* card_unmask_view_; | 
|  60  |  66  | 
 |  67   AutofillClient::GetRealPanResult unmasking_result_; | 
 |  68   bool unmasking_initial_should_store_pan_; | 
 |  69   int unmasking_number_of_attempts_; | 
 |  70   bool unmasking_allow_retry_; | 
 |  71  | 
|  61   CardUnmaskDelegate::UnmaskResponse pending_response_; |  72   CardUnmaskDelegate::UnmaskResponse pending_response_; | 
|  62  |  73  | 
|  63   base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_; |  74   base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_; | 
|  64  |  75  | 
|  65   DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImpl); |  76   DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImpl); | 
|  66 }; |  77 }; | 
|  67  |  78  | 
|  68 }  // namespace autofill |  79 }  // namespace autofill | 
|  69  |  80  | 
|  70 #endif  // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ |  81 #endif  // CHROME_BROWSER_UI_AUTOFILL_CARD_UNMASK_PROMPT_CONTROLLER_IMPL_H_ | 
| OLD | NEW |