| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h" | 9 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h" |
| 10 #include "chrome/browser/ui/autofill/save_card_bubble_view.h" | 10 #include "chrome/browser/ui/autofill/save_card_bubble_view.h" |
| 11 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view
.h" | 11 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view
.h" |
| 12 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
| 13 #include "ui/views/controls/link_listener.h" | 13 #include "ui/views/controls/link_listener.h" |
| 14 #include "ui/views/controls/styled_label_listener.h" | 14 #include "ui/views/controls/styled_label_listener.h" |
| 15 #include "ui/views/widget/widget_observer_view.h" |
| 15 | 16 |
| 16 namespace content { | 17 namespace content { |
| 17 class WebContents; | 18 class WebContents; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace views { | 21 namespace views { |
| 21 class LabelButton; | 22 class LabelButton; |
| 22 class Link; | 23 class Link; |
| 23 class StyledLabel; | 24 class StyledLabel; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace autofill { | 27 namespace autofill { |
| 27 | 28 |
| 28 // This class displays the "Save credit card?" bubble that is shown when the | 29 // This class displays the "Save credit card?" bubble that is shown when the |
| 29 // user submits a form with a credit card number that Autofill has not | 30 // user submits a form with a credit card number that Autofill has not |
| 30 // previously saved. | 31 // previously saved. |
| 31 class SaveCardBubbleViews : public SaveCardBubbleView, | 32 class SaveCardBubbleViews : public SaveCardBubbleView, |
| 32 public LocationBarBubbleDelegateView, | 33 public LocationBarBubbleDelegateView, |
| 33 public views::ButtonListener, | 34 public views::ButtonListener, |
| 34 public views::LinkListener, | 35 public views::LinkListener, |
| 35 public views::StyledLabelListener { | 36 public views::StyledLabelListener { |
| 36 public: | 37 public: |
| 37 // Bubble will be anchored to |anchor_view|. | 38 // Bubble will be anchored to |anchor_view|. |
| 38 SaveCardBubbleViews(views::View* anchor_view, | 39 SaveCardBubbleViews(views::WidgetObserverView* anchor_view, |
| 39 content::WebContents* web_contents, | 40 content::WebContents* web_contents, |
| 40 SaveCardBubbleController* controller); | 41 SaveCardBubbleController* controller); |
| 41 | 42 |
| 42 void Show(DisplayReason reason); | 43 void Show(DisplayReason reason); |
| 43 | 44 |
| 44 // SaveCardBubbleView | 45 // SaveCardBubbleView |
| 45 void Hide() override; | 46 void Hide() override; |
| 46 | 47 |
| 47 // views::View | 48 // views::View |
| 48 gfx::Size GetPreferredSize() const override; | 49 gfx::Size GetPreferredSize() const override; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 79 views::LabelButton* cancel_button_; | 80 views::LabelButton* cancel_button_; |
| 80 | 81 |
| 81 views::Link* learn_more_link_; | 82 views::Link* learn_more_link_; |
| 82 | 83 |
| 83 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews); | 84 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 } // namespace autofill | 87 } // namespace autofill |
| 87 | 88 |
| 88 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ | 89 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ |
| OLD | NEW |