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

Unified Diff: chrome/browser/ui/views/autofill/save_card_bubble_views.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: Change object lifecycles + add interface classes. 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/autofill/save_card_bubble_views.h
diff --git a/chrome/browser/ui/views/autofill/save_card_bubble_views.h b/chrome/browser/ui/views/autofill/save_card_bubble_views.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ed808e3318c50e711387d3561e205adf080ae93
--- /dev/null
+++ b/chrome/browser/ui/views/autofill/save_card_bubble_views.h
@@ -0,0 +1,65 @@
+// 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_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
+#define CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
+
+#include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h"
+#include "components/autofill/core/browser/ui/save_card_bubble_view.h"
+#include "ui/views/controls/button/button.h"
+
+namespace content {
+class WebContents;
+}
+
+namespace views {
+class LabelButton;
+}
+
+namespace autofill {
+
+class SaveCardBubbleController;
+
+// This class displays the "Save credit card?" bubble.
+class SaveCardBubbleViews : public SaveCardBubbleView,
+ public ManagedFullScreenBubbleDelegateView,
+ public views::ButtonListener {
+ public:
+ // Bubble will be anchored to |anchor_view|.
+ SaveCardBubbleViews(views::View* anchor_view,
+ content::WebContents* web_contents,
+ SaveCardBubbleController* controller);
+ ~SaveCardBubbleViews() override;
Evan Stade 2015/10/16 01:20:44 make private
bondd 2015/10/22 02:15:17 Done.
+
+ // SaveCardBubbleView
+ void Show() override;
+ void Close() override;
+ void ControllerGone() override;
+
+ // views::WidgetDelegate
+ views::View* GetInitiallyFocusedView() override;
+ base::string16 GetWindowTitle() const override;
+ bool ShouldShowWindowTitle() const override;
+ void WindowClosing() override;
+
+ // views::ButtonListener
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ private:
+ // views::BubbleDelegateView
+ void Init() override;
+
+ SaveCardBubbleController* controller_;
+
+ // Button for the user to confirm saving the credit card info.
+ views::LabelButton* save_button_;
+
+ views::LabelButton* cancel_button_;
+
+ DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews);
+};
+
+} // namespace autofill
+
+#endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_

Powered by Google App Engine
This is Rietveld 408576698