| 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 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" | 5 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 void PaymentRequestDialogView::ShowProcessingSpinner() { | 312 void PaymentRequestDialogView::ShowProcessingSpinner() { |
| 313 throbber_.Start(); | 313 throbber_.Start(); |
| 314 throbber_overlay_.SetVisible(true); | 314 throbber_overlay_.SetVisible(true); |
| 315 } | 315 } |
| 316 | 316 |
| 317 void PaymentRequestDialogView::HideProcessingSpinner() { | 317 void PaymentRequestDialogView::HideProcessingSpinner() { |
| 318 throbber_.Stop(); | 318 throbber_.Stop(); |
| 319 throbber_overlay_.SetVisible(false); | 319 throbber_overlay_.SetVisible(false); |
| 320 } | 320 } |
| 321 | 321 |
| 322 void PaymentRequestDialogView::OnEditorValidationError() { |
| 323 if (observer_for_testing_) |
| 324 observer_for_testing_->OnEditorValidationError(); |
| 325 } |
| 326 |
| 322 Profile* PaymentRequestDialogView::GetProfile() { | 327 Profile* PaymentRequestDialogView::GetProfile() { |
| 323 return Profile::FromBrowserContext( | 328 return Profile::FromBrowserContext( |
| 324 request_->web_contents()->GetBrowserContext()); | 329 request_->web_contents()->GetBrowserContext()); |
| 325 } | 330 } |
| 326 | 331 |
| 327 void PaymentRequestDialogView::ShowInitialPaymentSheet() { | 332 void PaymentRequestDialogView::ShowInitialPaymentSheet() { |
| 328 view_stack_->Push(CreateViewAndInstallController( | 333 view_stack_->Push(CreateViewAndInstallController( |
| 329 base::MakeUnique<PaymentSheetViewController>( | 334 base::MakeUnique<PaymentSheetViewController>( |
| 330 request_->spec(), request_->state(), this), | 335 request_->spec(), request_->state(), this), |
| 331 &controller_map_), | 336 &controller_map_), |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // When a view that is associated with a controller is removed from this | 389 // When a view that is associated with a controller is removed from this |
| 385 // view's descendants, dispose of the controller. | 390 // view's descendants, dispose of the controller. |
| 386 if (!details.is_add && | 391 if (!details.is_add && |
| 387 controller_map_.find(details.child) != controller_map_.end()) { | 392 controller_map_.find(details.child) != controller_map_.end()) { |
| 388 DCHECK(!details.move_view); | 393 DCHECK(!details.move_view); |
| 389 controller_map_.erase(details.child); | 394 controller_map_.erase(details.child); |
| 390 } | 395 } |
| 391 } | 396 } |
| 392 | 397 |
| 393 } // namespace payments | 398 } // namespace payments |
| OLD | NEW |