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 #include "chrome/browser/ui/autofill/credit_card_scanner_controller.h" | 5 #include "chrome/browser/ui/autofill/credit_card_scanner_controller.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // The time when the UI was shown. | 66 // The time when the UI was shown. |
67 base::TimeTicks show_time_; | 67 base::TimeTicks show_time_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(Controller); | 69 DISALLOW_COPY_AND_ASSIGN(Controller); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 // static | 74 // static |
75 bool CreditCardScannerController::HasCreditCardScanFeature() { | 75 bool CreditCardScannerController::HasCreditCardScanFeature() { |
76 return CreditCardScannerView::CanShow(); | 76 static const bool kCanShow = CreditCardScannerView::CanShow(); |
| 77 return kCanShow; |
77 } | 78 } |
78 | 79 |
79 // static | 80 // static |
80 void CreditCardScannerController::ScanCreditCard( | 81 void CreditCardScannerController::ScanCreditCard( |
81 content::WebContents* web_contents, | 82 content::WebContents* web_contents, |
82 const AutofillClient::CreditCardScanCallback& callback) { | 83 const AutofillClient::CreditCardScanCallback& callback) { |
83 (new Controller(web_contents, callback))->Show(); | 84 (new Controller(web_contents, callback))->Show(); |
84 } | 85 } |
85 | 86 |
86 } // namespace autofill | 87 } // namespace autofill |
OLD | NEW |