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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" | 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 5); | 426 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 5); |
427 progress_layout->set_cross_axis_alignment( | 427 progress_layout->set_cross_axis_alignment( |
428 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); | 428 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); |
429 progress_layout->set_main_axis_alignment( | 429 progress_layout->set_main_axis_alignment( |
430 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER); | 430 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER); |
431 progress_overlay_->SetLayoutManager(progress_layout); | 431 progress_overlay_->SetLayoutManager(progress_layout); |
432 | 432 |
433 progress_overlay_->SetVisible(false); | 433 progress_overlay_->SetVisible(false); |
434 AddChildView(progress_overlay_); | 434 AddChildView(progress_overlay_); |
435 | 435 |
436 progress_throbber_ = new views::CheckmarkThrobber(); | 436 progress_throbber_ = new views::MaterialThrobber(); |
437 progress_overlay_->AddChildView(progress_throbber_); | 437 progress_overlay_->AddChildView(progress_throbber_); |
438 | 438 |
439 progress_label_ = new views::Label(l10n_util::GetStringUTF16( | 439 progress_label_ = new views::Label(l10n_util::GetStringUTF16( |
440 IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_IN_PROGRESS)); | 440 IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_IN_PROGRESS)); |
441 // Material blue. TODO(estade): find an appropriate place for this color. | 441 // Material blue. TODO(estade): find an appropriate place for this color. |
442 progress_label_->SetEnabledColor(SkColorSetRGB(0x42, 0x85, 0xF4)); | 442 progress_label_->SetEnabledColor(SkColorSetRGB(0x42, 0x85, 0xF4)); |
443 progress_overlay_->AddChildView(progress_label_); | 443 progress_overlay_->AddChildView(progress_label_); |
444 } | 444 } |
445 | 445 |
446 bool CardUnmaskPromptViews::ExpirationDateIsValid() const { | 446 bool CardUnmaskPromptViews::ExpirationDateIsValid() const { |
(...skipping 29 matching lines...) Expand all Loading... |
476 views::View::OnPaint(canvas); | 476 views::View::OnPaint(canvas); |
477 canvas->Restore(); | 477 canvas->Restore(); |
478 } | 478 } |
479 | 479 |
480 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { | 480 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { |
481 alpha_ = alpha; | 481 alpha_ = alpha; |
482 SchedulePaint(); | 482 SchedulePaint(); |
483 } | 483 } |
484 | 484 |
485 } // namespace autofill | 485 } // namespace autofill |
OLD | NEW |