| OLD | NEW |
| (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_ |
| OLD | NEW |