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

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: defined(TOOLKIT_VIEWS) -> defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX). Created 5 years, 1 month 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/autofill/save_card_bubble_view.h"
10 #include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_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 that is shown when the
26 // user submits a form with a credit card number that Autofill has not
27 // previously saved.
28 class SaveCardBubbleViews : public SaveCardBubbleView,
29 public ManagedFullScreenBubbleDelegateView,
30 public views::ButtonListener {
31 public:
32 // Bubble will be anchored to |anchor_view|.
33 SaveCardBubbleViews(views::View* anchor_view,
34 content::WebContents* web_contents,
35 SaveCardBubbleController* controller);
36
37 // SaveCardBubbleView
38 void Show() override;
39 void Close() override;
40 void ControllerGone() override;
41
42 // views::WidgetDelegate
43 views::View* GetInitiallyFocusedView() override;
44 base::string16 GetWindowTitle() const override;
45 bool ShouldShowWindowTitle() const override;
46 void WindowClosing() override;
47
48 // views::ButtonListener
49 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
50
51 private:
52 ~SaveCardBubbleViews() override;
53
54 // views::BubbleDelegateView
55 void Init() override;
56
57 SaveCardBubbleController* controller_;
58
59 // Button for the user to confirm saving the credit card info.
60 views::LabelButton* save_button_;
61
62 views::LabelButton* cancel_button_;
63
64 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews);
65 };
66
67 } // namespace autofill
68
69 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/view_ids.h ('k') | chrome/browser/ui/views/autofill/save_card_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698