Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/views/location_bar/save_credit_card_icon_view.h" | |
| 6 | |
| 7 #include "chrome/app/chrome_command_ids.h" | |
| 8 #include "chrome/browser/ui/view_ids.h" | |
| 9 #include "chrome/browser/ui/views/autofill/save_card_bubble_view.h" | |
| 10 #include "chrome/grit/generated_resources.h" | |
| 11 #include "ui/base/l10n/l10n_util.h" | |
| 12 #include "ui/gfx/color_palette.h" | |
| 13 #include "ui/gfx/paint_vector_icon.h" | |
| 14 #include "ui/gfx/vector_icons_public.h" | |
| 15 | |
| 16 SaveCreditCardIconView::SaveCreditCardIconView(CommandUpdater* command_updater) | |
| 17 : BubbleIconView(command_updater, IDC_SAVE_CREDIT_CARD_FOR_PAGE) { | |
| 18 set_id(VIEW_ID_SAVE_CREDIT_CARD_BUTTON); | |
| 19 // TODO(bondd) before commit: Use proper tooltip. | |
| 20 SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_TRANSLATE)); | |
| 21 SetToggled(false); | |
| 22 } | |
| 23 | |
| 24 SaveCreditCardIconView::~SaveCreditCardIconView() {} | |
| 25 | |
| 26 void SaveCreditCardIconView::SetToggled(bool on) { | |
| 27 SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::AUTOFILL, 16, | |
|
Evan Stade
2015/10/09 18:54:45
this is slightly out of date now (after a recent c
bondd
2015/10/15 22:27:08
Acknowledged.
| |
| 28 on ? gfx::kGoogleBlue : gfx::kChromeIconGrey)); | |
| 29 } | |
| 30 | |
| 31 void SaveCreditCardIconView::OnExecuting( | |
| 32 BubbleIconView::ExecuteSource execute_source) {} | |
| 33 | |
| 34 views::BubbleDelegateView* SaveCreditCardIconView::GetBubble() const { | |
| 35 return autofill::SaveCardBubbleView::GetCurrentBubble(); | |
| 36 } | |
| OLD | NEW |