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

Side by Side Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc

Issue 2733823003: Move final vector icons out of ui/gfx/vector_icons/ and remove the (Closed)
Patch Set: fix deps 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
OLDNEW
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/grit/generated_resources.h" 12 #include "chrome/grit/generated_resources.h"
13 #include "chrome/grit/theme_resources.h" 13 #include "chrome/grit/theme_resources.h"
14 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller.h" 14 #include "components/autofill/core/browser/ui/card_unmask_prompt_controller.h"
15 #include "components/constrained_window/constrained_window_views.h" 15 #include "components/constrained_window/constrained_window_views.h"
16 #include "components/strings/grit/components_strings.h" 16 #include "components/strings/grit/components_strings.h"
17 #include "components/web_modal/web_contents_modal_dialog_host.h" 17 #include "components/web_modal/web_contents_modal_dialog_host.h"
18 #include "components/web_modal/web_contents_modal_dialog_manager.h" 18 #include "components/web_modal/web_contents_modal_dialog_manager.h"
19 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 19 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
20 #include "third_party/skia/include/core/SkColor.h" 20 #include "third_party/skia/include/core/SkColor.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
23 #include "ui/compositor/compositing_recorder.h" 23 #include "ui/compositor/compositing_recorder.h"
24 #include "ui/gfx/canvas.h" 24 #include "ui/gfx/canvas.h"
25 #include "ui/gfx/color_palette.h" 25 #include "ui/gfx/color_palette.h"
26 #include "ui/gfx/geometry/safe_integer_conversions.h" 26 #include "ui/gfx/geometry/safe_integer_conversions.h"
27 #include "ui/gfx/paint_vector_icon.h" 27 #include "ui/gfx/paint_vector_icon.h"
28 #include "ui/gfx/vector_icons_public.h" 28 #include "ui/vector_icons/vector_icons.h"
29 #include "ui/views/background.h" 29 #include "ui/views/background.h"
30 #include "ui/views/border.h" 30 #include "ui/views/border.h"
31 #include "ui/views/bubble/tooltip_icon.h" 31 #include "ui/views/bubble/tooltip_icon.h"
32 #include "ui/views/controls/button/checkbox.h" 32 #include "ui/views/controls/button/checkbox.h"
33 #include "ui/views/controls/combobox/combobox.h" 33 #include "ui/views/controls/combobox/combobox.h"
34 #include "ui/views/controls/image_view.h" 34 #include "ui/views/controls/image_view.h"
35 #include "ui/views/controls/label.h" 35 #include "ui/views/controls/label.h"
36 #include "ui/views/controls/link.h" 36 #include "ui/views/controls/link.h"
37 #include "ui/views/controls/textfield/textfield.h" 37 #include "ui/views/controls/textfield/textfield.h"
38 #include "ui/views/controls/throbber.h" 38 #include "ui/views/controls/throbber.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 4); 452 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 4);
453 temporary_error->SetLayoutManager(temporary_error_layout); 453 temporary_error->SetLayoutManager(temporary_error_layout);
454 temporary_error_layout->set_cross_axis_alignment( 454 temporary_error_layout->set_cross_axis_alignment(
455 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START); 455 views::BoxLayout::CROSS_AXIS_ALIGNMENT_START);
456 temporary_error->SetBorder(views::CreateEmptyBorder(8, 0, 0, 0)); 456 temporary_error->SetBorder(views::CreateEmptyBorder(8, 0, 0, 0));
457 controls_container->AddChildView(temporary_error); 457 controls_container->AddChildView(temporary_error);
458 458
459 error_icon_ = new views::ImageView(); 459 error_icon_ = new views::ImageView();
460 error_icon_->SetVisible(false); 460 error_icon_->SetVisible(false);
461 error_icon_->SetImage( 461 error_icon_->SetImage(
462 gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 16, kWarningColor)); 462 gfx::CreateVectorIcon(ui::kWarningIcon, 16, kWarningColor));
463 temporary_error->AddChildView(error_icon_); 463 temporary_error->AddChildView(error_icon_);
464 464
465 // Reserve vertical space for the error label, assuming it's one line. 465 // Reserve vertical space for the error label, assuming it's one line.
466 error_label_ = new views::Label(base::ASCIIToUTF16(" ")); 466 error_label_ = new views::Label(base::ASCIIToUTF16(" "));
467 error_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 467 error_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
468 error_label_->SetEnabledColor(kWarningColor); 468 error_label_->SetEnabledColor(kWarningColor);
469 temporary_error->AddChildView(error_label_); 469 temporary_error->AddChildView(error_label_);
470 temporary_error_layout->SetFlexForView(error_label_, 1); 470 temporary_error_layout->SetFlexForView(error_label_, 1);
471 471
472 progress_overlay_ = new FadeOutView(); 472 progress_overlay_ = new FadeOutView();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 views::View::OnPaint(canvas); 525 views::View::OnPaint(canvas);
526 canvas->Restore(); 526 canvas->Restore();
527 } 527 }
528 528
529 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { 529 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) {
530 alpha_ = alpha; 530 alpha_ = alpha;
531 SchedulePaint(); 531 SchedulePaint();
532 } 532 }
533 533
534 } // namespace autofill 534 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698