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

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: Replace browser tests with unit tests. Address reviewer comments. 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 "base/macros.h"
9 #include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h"
10 #include "components/autofill/core/browser/ui/save_card_bubble_view.h"
11 #include "ui/views/controls/button/button.h"
12
13 namespace content {
14 class WebContents;
15 }
16
17 namespace views {
18 class LabelButton;
19 }
20
21 namespace autofill {
22
23 class SaveCardBubbleController;
24
25 // This class displays the "Save credit card?" bubble.
Evan Stade 2015/10/23 01:39:41 probably helps to be a bit more descriptive in ter
bondd 2015/10/23 03:32:34 Done.
26 class SaveCardBubbleViews : public SaveCardBubbleView,
27 public ManagedFullScreenBubbleDelegateView,
28 public views::ButtonListener {
29 public:
30 // Bubble will be anchored to |anchor_view|.
31 SaveCardBubbleViews(views::View* anchor_view,
32 content::WebContents* web_contents,
33 SaveCardBubbleController* controller);
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 ~SaveCardBubbleViews() override;
51
52 // views::BubbleDelegateView
53 void Init() override;
54
55 SaveCardBubbleController* controller_;
56
57 // Button for the user to confirm saving the credit card info.
58 views::LabelButton* save_button_;
59
60 views::LabelButton* cancel_button_;
61
62 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews);
63 };
64
65 } // namespace autofill
66
67 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698