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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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_CREDIT_CARD_SCANNER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
10 11
11 namespace content { 12 namespace content {
12 class WebContents; 13 class WebContents;
13 } 14 }
14 15
15 namespace autofill { 16 namespace autofill {
16 17
17 class CreditCardScannerViewDelegate; 18 class CreditCardScannerViewDelegate;
18 19
19 // View for the credit card scanner UI. Owned by the controller. 20 // View for the credit card scanner UI. Owned by the controller.
20 class CreditCardScannerView { 21 class CreditCardScannerView {
21 public: 22 public:
22 // Returns true if the platform implements the credit card scanner UI and the 23 // Returns true if the platform implements the credit card scanner UI and the
23 // device supports scanning credit cards, e.g., it has a camera. 24 // device supports scanning credit cards, e.g., it has a camera.
24 static bool CanShow(); 25 static bool CanShow();
25 26
26 // Creates a view for the credit card scanner UI. The view is associated with 27 // Creates a view for the credit card scanner UI. The view is associated with
27 // the |web_contents| and notifies the |delegate| when a scan is cancelled or 28 // the |web_contents| and notifies the |delegate| when a scan is cancelled or
28 // completed. Should be called only if CanShow() returns true. 29 // completed. Should be called only if CanShow() returns true.
29 static scoped_ptr<CreditCardScannerView> Create( 30 static std::unique_ptr<CreditCardScannerView> Create(
30 const base::WeakPtr<CreditCardScannerViewDelegate>& delegate, 31 const base::WeakPtr<CreditCardScannerViewDelegate>& delegate,
31 content::WebContents* web_contents); 32 content::WebContents* web_contents);
32 33
33 virtual ~CreditCardScannerView() {} 34 virtual ~CreditCardScannerView() {}
34 35
35 // Shows the UI for scanning credit cards. 36 // Shows the UI for scanning credit cards.
36 virtual void Show() = 0; 37 virtual void Show() = 0;
37 }; 38 };
38 39
39 } // namespace autofill 40 } // namespace autofill
40 41
41 #endif // CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_ 42 #endif // CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/credit_card_scanner_controller.cc ('k') | chrome/browser/ui/autofill/credit_card_scanner_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698