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

Side by Side 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 unified diff | Download patch
OLDNEW
(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_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
7
8 #include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h"
9 #include "components/autofill/core/browser/ui/save_card_bubble_view.h"
10 #include "ui/views/controls/button/button.h"
11
12 namespace content {
13 class WebContents;
14 }
15
16 namespace views {
17 class LabelButton;
18 }
19
20 namespace autofill {
21
22 class SaveCardBubbleController;
23
24 // This class displays the "Save credit card?" bubble.
25 class SaveCardBubbleViews : public SaveCardBubbleView,
26 public ManagedFullScreenBubbleDelegateView,
27 public views::ButtonListener {
28 public:
29 // Bubble will be anchored to |anchor_view|.
30 SaveCardBubbleViews(views::View* anchor_view,
31 content::WebContents* web_contents,
32 SaveCardBubbleController* controller);
33 ~SaveCardBubbleViews() override;
Evan Stade 2015/10/16 01:20:44 make private
bondd 2015/10/22 02:15:17 Done.
34
35 // SaveCardBubbleView
36 void Show() override;
37 void Close() override;
38 void ControllerGone() override;
39
40 // views::WidgetDelegate
41 views::View* GetInitiallyFocusedView() override;
42 base::string16 GetWindowTitle() const override;
43 bool ShouldShowWindowTitle() const override;
44 void WindowClosing() override;
45
46 // views::ButtonListener
47 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
48
49 private:
50 // views::BubbleDelegateView
51 void Init() override;
52
53 SaveCardBubbleController* controller_;
54
55 // Button for the user to confirm saving the credit card info.
56 views::LabelButton* save_button_;
57
58 views::LabelButton* cancel_button_;
59
60 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews);
61 };
62
63 } // namespace autofill
64
65 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698