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

Side by Side Diff: chrome/browser/ui/views/payments/test_chrome_payment_request_delegate.h

Issue 2829503002: [Payments] Normalize Shipping Address sent to merchant on Desktop. (Closed)
Patch Set: Be more strict on country code Created 3 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 TestChromePaymentRequestDelegate( 29 TestChromePaymentRequestDelegate(
30 content::WebContents* web_contents, 30 content::WebContents* web_contents,
31 PaymentRequestDialogView::ObserverForTest* observer, 31 PaymentRequestDialogView::ObserverForTest* observer,
32 views::WidgetObserver* widget_observer, 32 views::WidgetObserver* widget_observer,
33 bool is_incognito, 33 bool is_incognito,
34 bool is_valid_ssl); 34 bool is_valid_ssl);
35 35
36 // This class allows tests to provide their own AddressInput data. 36 // This class allows tests to provide their own AddressInput data.
37 class AddressInputProvider { 37 class AddressInputProvider {
38 public: 38 public:
39 virtual std::unique_ptr<const ::i18n::addressinput::Source> 39 virtual std::unique_ptr<::i18n::addressinput::Source>
40 GetAddressInputSource() = 0; 40 GetAddressInputSource() = 0;
41 virtual std::unique_ptr<::i18n::addressinput::Storage> 41 virtual std::unique_ptr<::i18n::addressinput::Storage>
42 GetAddressInputStorage() = 0; 42 GetAddressInputStorage() = 0;
43 }; 43 };
44 44
45 void SetAddressInputOverride(AddressInputProvider* address_input_provider) { 45 void SetAddressInputOverride(AddressInputProvider* address_input_provider) {
46 address_input_provider_ = address_input_provider; 46 address_input_provider_ = address_input_provider;
47 } 47 }
48 48
49 // ChromePaymentRequestDelegate. 49 // ChromePaymentRequestDelegate.
50 void ShowDialog(PaymentRequest* request) override; 50 void ShowDialog(PaymentRequest* request) override;
51 bool IsIncognito() const override; 51 bool IsIncognito() const override;
52 bool IsSslCertificateValid() override; 52 bool IsSslCertificateValid() override;
53 std::unique_ptr<const ::i18n::addressinput::Source> GetAddressInputSource() 53 std::unique_ptr<::i18n::addressinput::Source> GetAddressInputSource()
54 override; 54 override;
55 std::unique_ptr<::i18n::addressinput::Storage> GetAddressInputStorage() 55 std::unique_ptr<::i18n::addressinput::Storage> GetAddressInputStorage()
56 override; 56 override;
57 57
58 PaymentRequestDialogView* dialog_view() { 58 PaymentRequestDialogView* dialog_view() {
59 return static_cast<PaymentRequestDialogView*>(dialog_); 59 return static_cast<PaymentRequestDialogView*>(dialog_);
60 } 60 }
61 61
62 private: 62 private:
63 // Not owned so must outlive the PaymentRequest object; 63 // Not owned so must outlive the PaymentRequest object;
64 AddressInputProvider* address_input_provider_; 64 AddressInputProvider* address_input_provider_;
65 65
66 PaymentRequestDialogView::ObserverForTest* observer_; 66 PaymentRequestDialogView::ObserverForTest* observer_;
67 views::WidgetObserver* widget_observer_; 67 views::WidgetObserver* widget_observer_;
68 bool is_incognito_; 68 bool is_incognito_;
69 bool is_valid_ssl_; 69 bool is_valid_ssl_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(TestChromePaymentRequestDelegate); 71 DISALLOW_COPY_AND_ASSIGN(TestChromePaymentRequestDelegate);
72 }; 72 };
73 73
74 } // namespace payments 74 } // namespace payments
75 75
76 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE _H_ 76 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698