| 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SAVE_CREDIT_CARD_ICON_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SAVE_CREDIT_CARD_ICON_VIEW_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" |
| 10 |
| 11 class Browser; |
| 12 class CommandUpdater; |
| 13 |
| 14 // The icon to show the Save Credit Card bubble where the user can choose to |
| 15 // save the credit card info to use again later without re-entering it. |
| 16 class SaveCreditCardIconView : public BubbleIconView { |
| 17 public: |
| 18 explicit SaveCreditCardIconView(CommandUpdater* command_updater, |
| 19 Browser* browser); |
| 20 ~SaveCreditCardIconView() override; |
| 21 |
| 22 // Toggles the icon on or off. |
| 23 void SetToggled(bool on); |
| 24 |
| 25 protected: |
| 26 // BubbleIconView: |
| 27 void OnExecuting(BubbleIconView::ExecuteSource execute_source) override; |
| 28 views::BubbleDelegateView* GetBubble() const override; |
| 29 gfx::VectorIconId GetVectorIcon() const override; |
| 30 |
| 31 private: |
| 32 // May be nullptr. |
| 33 Browser* browser_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(SaveCreditCardIconView); |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SAVE_CREDIT_CARD_ICON_VIEW_H_ |
| OLD | NEW |