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

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

Issue 2724063002: [Payments] Add a Pay button in the Order summary screen (Closed)
Patch Set: addressed comments Created 3 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/payments/payment_sheet_view_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "components/payments/content/payment_request.h" 5 #include "components/payments/content/payment_request.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <unordered_map> 8 #include <unordered_map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 client_.reset(); 105 client_.reset();
106 binding_.Close(); 106 binding_.Close();
107 delegate_->CloseDialog(); 107 delegate_->CloseDialog();
108 manager_->DestroyRequest(this); 108 manager_->DestroyRequest(this);
109 } 109 }
110 110
111 void PaymentRequest::Pay() { 111 void PaymentRequest::Pay() {
112 DCHECK(is_ready_to_pay_); 112 DCHECK(is_ready_to_pay_);
113 113
114 // TODO(mathp): Return the PaymentResponse to the |client_|. 114 // TODO(mathp): Return the PaymentResponse to the |client_|.
115 UserCancelled(); 115 OnConnectionTerminated();
116 } 116 }
117 117
118 void PaymentRequest::AddObserver(Observer* observer) { 118 void PaymentRequest::AddObserver(Observer* observer) {
119 CHECK(observer); 119 CHECK(observer);
120 observers_.AddObserver(observer); 120 observers_.AddObserver(observer);
121 } 121 }
122 122
123 void PaymentRequest::RemoveObserver(Observer* observer) { 123 void PaymentRequest::RemoveObserver(Observer* observer) {
124 observers_.RemoveObserver(observer); 124 observers_.RemoveObserver(observer);
125 } 125 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 ->GetInfo(autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER), 324 ->GetInfo(autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER),
325 app_locale) 325 app_locale)
326 .empty())) { 326 .empty())) {
327 return false; 327 return false;
328 } 328 }
329 329
330 return true; 330 return true;
331 } 331 }
332 332
333 } // namespace payments 333 } // namespace payments
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/payments/payment_sheet_view_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698