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

Side by Side Diff: components/payments/content/payment_request.h

Issue 2815723002: [Web Payments] Add Spinners and timeout while waiting for UpdateWith (Closed)
Patch Set: 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 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
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/timer/timer.h"
12 #include "components/payments/content/payment_request.mojom.h" 13 #include "components/payments/content/payment_request.mojom.h"
13 #include "components/payments/content/payment_request_spec.h" 14 #include "components/payments/content/payment_request_spec.h"
14 #include "components/payments/content/payment_request_state.h" 15 #include "components/payments/content/payment_request_state.h"
15 #include "components/payments/core/payment_request_delegate.h" 16 #include "components/payments/core/payment_request_delegate.h"
16 #include "mojo/public/cpp/bindings/binding.h" 17 #include "mojo/public/cpp/bindings/binding.h"
17 #include "mojo/public/cpp/bindings/interface_request.h" 18 #include "mojo/public/cpp/bindings/interface_request.h"
18 19
19 namespace content { 20 namespace content {
20 class WebContents; 21 class WebContents;
21 } 22 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 83
83 // Called when the user clicks on the "Pay" button. 84 // Called when the user clicks on the "Pay" button.
84 void Pay(); 85 void Pay();
85 86
86 content::WebContents* web_contents() { return web_contents_; } 87 content::WebContents* web_contents() { return web_contents_; }
87 88
88 PaymentRequestSpec* spec() { return spec_.get(); } 89 PaymentRequestSpec* spec() { return spec_.get(); }
89 PaymentRequestState* state() { return state_.get(); } 90 PaymentRequestState* state() { return state_.get(); }
90 91
91 private: 92 private:
93 void StartWaitTimeout();
94
92 content::WebContents* web_contents_; 95 content::WebContents* web_contents_;
93 std::unique_ptr<PaymentRequestDelegate> delegate_; 96 std::unique_ptr<PaymentRequestDelegate> delegate_;
94 // |manager_| owns this PaymentRequest. 97 // |manager_| owns this PaymentRequest.
95 PaymentRequestWebContentsManager* manager_; 98 PaymentRequestWebContentsManager* manager_;
96 mojo::Binding<mojom::PaymentRequest> binding_; 99 mojo::Binding<mojom::PaymentRequest> binding_;
97 mojom::PaymentRequestClientPtr client_; 100 mojom::PaymentRequestClientPtr client_;
98 101
99 std::unique_ptr<PaymentRequestSpec> spec_; 102 std::unique_ptr<PaymentRequestSpec> spec_;
100 std::unique_ptr<PaymentRequestState> state_; 103 std::unique_ptr<PaymentRequestState> state_;
101 104
102 // May be null, must outlive this object. 105 // May be null, must outlive this object.
103 ObserverForTest* observer_for_testing_; 106 ObserverForTest* observer_for_testing_;
104 107
108 base::OneShotTimer wait_timer_;
please use gerrit instead 2017/04/11 19:15:09 Not necessary. There's already a timer in Blink:
anthonyvd 2017/04/13 14:56:22 Ah! Thanks :)
109
105 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); 110 DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
106 }; 111 };
107 112
108 } // namespace payments 113 } // namespace payments
109 114
110 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_ 115 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/payments/payment_sheet_view_controller.cc ('k') | components/payments/content/payment_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698