Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / autofill / credit_card_scanner_view.h
blobc01e2ebf91477da48b48e1b2d2f67f67dafa0b6d
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 #ifndef CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h"
11 namespace content {
12 class WebContents;
15 namespace autofill {
17 class CreditCardScannerViewDelegate;
19 // View for the credit card scanner UI. Owned by the controller.
20 class CreditCardScannerView {
21 public:
22 // 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 static bool CanShow();
26 // 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 // completed. Should be called only if CanShow() returns true.
29 static scoped_ptr<CreditCardScannerView> Create(
30 const base::WeakPtr<CreditCardScannerViewDelegate>& delegate,
31 content::WebContents* web_contents);
33 virtual ~CreditCardScannerView() {}
35 // Shows the UI for scanning credit cards.
36 virtual void Show() = 0;
39 } // namespace autofill
41 #endif // CHROME_BROWSER_UI_AUTOFILL_CREDIT_CARD_SCANNER_VIEW_H_