| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autofill/card_unmask_prompt_views.h" | 5 #include "chrome/browser/ui/views/autofill/card_unmask_prompt_views.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "chrome/browser/ui/autofill/create_card_unmask_prompt_view.h" | 11 #include "chrome/browser/ui/autofill/create_card_unmask_prompt_view.h" |
| 12 #include "chrome/browser/ui/browser_dialogs.h" |
| 12 #include "chrome/browser/ui/views/autofill/view_util.h" | 13 #include "chrome/browser/ui/views/autofill/view_util.h" |
| 13 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
| 14 #include "chrome/grit/theme_resources.h" | 15 #include "chrome/grit/theme_resources.h" |
| 15 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller.h" | 16 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller.h" |
| 16 #include "components/constrained_window/constrained_window_views.h" | 17 #include "components/constrained_window/constrained_window_views.h" |
| 17 #include "components/strings/grit/components_strings.h" | 18 #include "components/strings/grit/components_strings.h" |
| 18 #include "components/web_modal/web_contents_modal_dialog_host.h" | 19 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 19 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 20 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 20 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 21 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
| 21 #include "third_party/skia/include/core/SkColor.h" | 22 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 new_card_link_(nullptr), | 73 new_card_link_(nullptr), |
| 73 error_icon_(nullptr), | 74 error_icon_(nullptr), |
| 74 error_label_(nullptr), | 75 error_label_(nullptr), |
| 75 storage_row_(nullptr), | 76 storage_row_(nullptr), |
| 76 storage_checkbox_(nullptr), | 77 storage_checkbox_(nullptr), |
| 77 progress_overlay_(nullptr), | 78 progress_overlay_(nullptr), |
| 78 progress_throbber_(nullptr), | 79 progress_throbber_(nullptr), |
| 79 progress_label_(nullptr), | 80 progress_label_(nullptr), |
| 80 overlay_animation_(this), | 81 overlay_animation_(this), |
| 81 weak_ptr_factory_(this) { | 82 weak_ptr_factory_(this) { |
| 83 chrome::RecordDialogCreation(chrome::DialogIdentifier::CARD_UNMASK); |
| 82 } | 84 } |
| 83 | 85 |
| 84 CardUnmaskPromptViews::~CardUnmaskPromptViews() { | 86 CardUnmaskPromptViews::~CardUnmaskPromptViews() { |
| 85 if (controller_) | 87 if (controller_) |
| 86 controller_->OnUnmaskDialogClosed(); | 88 controller_->OnUnmaskDialogClosed(); |
| 87 } | 89 } |
| 88 | 90 |
| 89 void CardUnmaskPromptViews::Show() { | 91 void CardUnmaskPromptViews::Show() { |
| 90 constrained_window::ShowWebModalDialogViews(this, web_contents_); | 92 constrained_window::ShowWebModalDialogViews(this, web_contents_); |
| 91 } | 93 } |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 views::View::OnPaint(canvas); | 525 views::View::OnPaint(canvas); |
| 524 canvas->Restore(); | 526 canvas->Restore(); |
| 525 } | 527 } |
| 526 | 528 |
| 527 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { | 529 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { |
| 528 alpha_ = alpha; | 530 alpha_ = alpha; |
| 529 SchedulePaint(); | 531 SchedulePaint(); |
| 530 } | 532 } |
| 531 | 533 |
| 532 } // namespace autofill | 534 } // namespace autofill |
| OLD | NEW |