Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/save_credit_card_icon_view.h |
| diff --git a/chrome/browser/ui/views/location_bar/save_credit_card_icon_view.h b/chrome/browser/ui/views/location_bar/save_credit_card_icon_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8d37bc13a17e2714b71c6888cd2289b24fe638ae |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/location_bar/save_credit_card_icon_view.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SAVE_CREDIT_CARD_ICON_VIEW_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SAVE_CREDIT_CARD_ICON_VIEW_H_ |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" |
| + |
| +class Browser; |
| +class CommandUpdater; |
| + |
| +// The icon to show the Save Credit Card bubble where the user can choose to |
| +// save the credit card info to use again later without re-entering it. |
| +class SaveCreditCardIconView : public BubbleIconView { |
| + public: |
| + explicit SaveCreditCardIconView(CommandUpdater* command_updater, |
| + Browser* browser); |
| + ~SaveCreditCardIconView() override; |
| + |
| + // Toggles the icon on or off. |
| + void SetToggled(bool on); |
| + |
| + protected: |
| + // BubbleIconView: |
| + void OnExecuting(BubbleIconView::ExecuteSource execute_source) override; |
| + views::BubbleDelegateView* GetBubble() const override; |
| + |
| + private: |
| + // May be nullptr. |
|
sky
2015/10/26 20:56:26
AFAICT browser_ is always non-null. Am I missing s
bondd
2015/10/27 01:06:39
browser_ is null if LocationBarView is created thr
sky
2015/10/27 20:58:25
Acknowledged.
|
| + Browser* browser_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SaveCreditCardIconView); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SAVE_CREDIT_CARD_ICON_VIEW_H_ |