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

Unified Diff: chrome/browser/ui/views/location_bar/save_credit_card_icon_view.h

Issue 1396923003: Autofill: Replace "save credit card" infobar with a bubble (Views only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak SaveCardBubbleControllerImpl::DidNavigateMainFrame logic. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698