| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ |
| 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ | 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // PaymentRequestSpec, and the current user selection state (and related data) | 32 // PaymentRequestSpec, and the current user selection state (and related data) |
| 33 // is stored in PaymentRequestSpec. | 33 // is stored in PaymentRequestSpec. |
| 34 class PaymentRequest : public mojom::PaymentRequest, | 34 class PaymentRequest : public mojom::PaymentRequest, |
| 35 public PaymentRequestSpec::Observer, | 35 public PaymentRequestSpec::Observer, |
| 36 public PaymentRequestState::Delegate { | 36 public PaymentRequestState::Delegate { |
| 37 public: | 37 public: |
| 38 class ObserverForTest { | 38 class ObserverForTest { |
| 39 public: | 39 public: |
| 40 virtual void OnCanMakePaymentCalled() = 0; | 40 virtual void OnCanMakePaymentCalled() = 0; |
| 41 virtual void OnNotSupportedError() = 0; | 41 virtual void OnNotSupportedError() = 0; |
| 42 virtual void OnConnectionTerminated() = 0; |
| 42 | 43 |
| 43 protected: | 44 protected: |
| 44 virtual ~ObserverForTest() {} | 45 virtual ~ObserverForTest() {} |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 PaymentRequest(content::WebContents* web_contents, | 48 PaymentRequest(content::WebContents* web_contents, |
| 48 std::unique_ptr<PaymentRequestDelegate> delegate, | 49 std::unique_ptr<PaymentRequestDelegate> delegate, |
| 49 PaymentRequestWebContentsManager* manager, | 50 PaymentRequestWebContentsManager* manager, |
| 50 mojo::InterfaceRequest<mojom::PaymentRequest> request, | 51 mojo::InterfaceRequest<mojom::PaymentRequest> request, |
| 51 ObserverForTest* observer_for_testing); | 52 ObserverForTest* observer_for_testing); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 ObserverForTest* observer_for_testing_; | 105 ObserverForTest* observer_for_testing_; |
| 105 | 106 |
| 106 JourneyLogger journey_logger_; | 107 JourneyLogger journey_logger_; |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); | 109 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace payments | 112 } // namespace payments |
| 112 | 113 |
| 113 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ | 114 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ |
| OLD | NEW |