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

Side by Side Diff: chrome/browser/ui/autofill/save_card_bubble_controller_impl.h

Issue 1540423004: Add card details and legal message to Android save credit card infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Edits Created 4 years, 11 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
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_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
7 7
8 #include <vector>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
10 #include "base/timer/elapsed_timer.h" 12 #include "base/timer/elapsed_timer.h"
11 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h" 13 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h"
12 #include "content/public/browser/web_contents_observer.h" 14 #include "content/public/browser/web_contents_observer.h"
13 #include "content/public/browser/web_contents_user_data.h" 15 #include "content/public/browser/web_contents_user_data.h"
14 16
15 namespace autofill { 17 namespace autofill {
16 18
17 // Implementation of per-tab class to control the save credit card bubble and 19 // Implementation of per-tab class to control the save credit card bubble and
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 71
70 // SaveCardBubbleController: 72 // SaveCardBubbleController:
71 base::string16 GetWindowTitle() const override; 73 base::string16 GetWindowTitle() const override;
72 base::string16 GetExplanatoryMessage() const override; 74 base::string16 GetExplanatoryMessage() const override;
73 void OnSaveButton() override; 75 void OnSaveButton() override;
74 void OnCancelButton() override; 76 void OnCancelButton() override;
75 void OnLearnMoreClicked() override; 77 void OnLearnMoreClicked() override;
76 void OnLegalMessageLinkClicked(const GURL& url) override; 78 void OnLegalMessageLinkClicked(const GURL& url) override;
77 void OnBubbleClosed() override; 79 void OnBubbleClosed() override;
78 80
79 const LegalMessageLines& GetLegalMessageLines() const override; 81 const std::vector<scoped_ptr<LegalMessageLine>>& GetLegalMessageLines()
82 const override;
80 83
81 protected: 84 protected:
82 explicit SaveCardBubbleControllerImpl(content::WebContents* web_contents); 85 explicit SaveCardBubbleControllerImpl(content::WebContents* web_contents);
83 ~SaveCardBubbleControllerImpl() override; 86 ~SaveCardBubbleControllerImpl() override;
84 87
85 // Returns the time elapsed since |timer_| was initialized. 88 // Returns the time elapsed since |timer_| was initialized.
86 // Exists for testing. 89 // Exists for testing.
87 virtual base::TimeDelta Elapsed() const; 90 virtual base::TimeDelta Elapsed() const;
88 91
89 // content::WebContentsObserver: 92 // content::WebContentsObserver:
(...skipping 19 matching lines...) Expand all
109 // show and the icon is not visible. 112 // show and the icon is not visible.
110 base::Closure save_card_callback_; 113 base::Closure save_card_callback_;
111 114
112 // Governs whether the upload or local save version of the UI should be shown. 115 // Governs whether the upload or local save version of the UI should be shown.
113 bool is_uploading_; 116 bool is_uploading_;
114 117
115 // Whether ReshowBubble() has been called since ShowBubbleFor*() was called. 118 // Whether ReshowBubble() has been called since ShowBubbleFor*() was called.
116 bool is_reshow_; 119 bool is_reshow_;
117 120
118 // If no legal message should be shown then this variable is an empty vector. 121 // If no legal message should be shown then this variable is an empty vector.
119 LegalMessageLines legal_message_lines_; 122 std::vector<scoped_ptr<LegalMessageLine>> legal_message_lines_;
120 123
121 // Used to measure the amount of time on a page; if it's less than some 124 // Used to measure the amount of time on a page; if it's less than some
122 // reasonable limit, then don't close the bubble upon navigation. 125 // reasonable limit, then don't close the bubble upon navigation.
123 scoped_ptr<base::ElapsedTimer> timer_; 126 scoped_ptr<base::ElapsedTimer> timer_;
124 127
125 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl); 128 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl);
126 }; 129 };
127 130
128 } // namespace autofill 131 } // namespace autofill
129 132
130 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 133 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698