Chromium Code Reviews| 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_view.h" | 9 #include "chrome/browser/ui/autofill/save_card_bubble_view.h" |
| 10 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view .h" | 10 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view .h" |
| 11 #include "chrome/browser/ui/views/payments/view_stack.h" | |
| 11 #include "components/autofill/core/browser/ui/save_card_bubble_controller.h" | 12 #include "components/autofill/core/browser/ui/save_card_bubble_controller.h" |
| 12 #include "ui/views/controls/link_listener.h" | 13 #include "ui/views/controls/link_listener.h" |
| 13 #include "ui/views/controls/styled_label_listener.h" | 14 #include "ui/views/controls/styled_label_listener.h" |
| 14 #include "ui/views/controls/textfield/textfield_controller.h" | 15 #include "ui/views/controls/textfield/textfield_controller.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 { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 int event_flags) override; | 72 int event_flags) override; |
| 72 | 73 |
| 73 // views::TextfieldController | 74 // views::TextfieldController |
| 74 void ContentsChanged(views::Textfield* sender, | 75 void ContentsChanged(views::Textfield* sender, |
| 75 const base::string16& new_contents) override; | 76 const base::string16& new_contents) override; |
| 76 | 77 |
| 77 private: | 78 private: |
| 78 ~SaveCardBubbleViews() override; | 79 ~SaveCardBubbleViews() override; |
| 79 | 80 |
| 80 std::unique_ptr<views::View> CreateMainContentView(); | 81 std::unique_ptr<views::View> CreateMainContentView(); |
| 81 std::unique_ptr<views::View> CreateRequestCvcView(); | 82 void CreateAndAddRequestCvcViewToViewStack(); |
| 83 | |
| 84 // Returns whether the upload or local save version of the UI is being shown. | |
| 85 bool IsUploading(); | |
| 82 | 86 |
| 83 // views::BubbleDialogDelegateView | 87 // views::BubbleDialogDelegateView |
| 84 void Init() override; | 88 void Init() override; |
| 85 | 89 |
| 86 SaveCardBubbleController* controller_; // Weak reference. | 90 SaveCardBubbleController* controller_; // Weak reference. |
| 87 | 91 |
| 92 views::Link* learn_more_link_; | |
|
Mathieu
2017/05/17 23:53:01
curious: any reason for bringing this up ?
Jared Saul
2017/05/18 17:01:23
It was purely so that it wasn't mistaken as part o
| |
| 93 | |
| 94 // Upload save state | |
| 95 std::unique_ptr<ViewStack> view_stack_; | |
| 88 views::Textfield* cvc_textfield_; | 96 views::Textfield* cvc_textfield_; |
| 89 | 97 |
| 90 views::Link* learn_more_link_; | |
| 91 | |
| 92 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews); | 98 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleViews); |
| 93 }; | 99 }; |
| 94 | 100 |
| 95 } // namespace autofill | 101 } // namespace autofill |
| 96 | 102 |
| 97 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ | 103 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_BUBBLE_VIEWS_H_ |
| OLD | NEW |