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

Side by Side Diff: components/autofill/content/browser/autocheckout_manager.h

Issue 18179015: Send IPC from renderer to browser on each Autocheckout page completion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment Created 7 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 class AutocheckoutManager { 43 class AutocheckoutManager {
44 public: 44 public:
45 explicit AutocheckoutManager(AutofillManager* autofill_manager); 45 explicit AutocheckoutManager(AutofillManager* autofill_manager);
46 virtual ~AutocheckoutManager(); 46 virtual ~AutocheckoutManager();
47 47
48 // Fill all the forms seen by the Autofill manager with the information 48 // Fill all the forms seen by the Autofill manager with the information
49 // gathered from the requestAutocomplete dialog. 49 // gathered from the requestAutocomplete dialog.
50 void FillForms(); 50 void FillForms();
51 51
52 // Called when clicking a proceed element in an Autocheckout flow fails. 52 // Called to signal a page is completed in renderer in the Autocheckout flow.
53 // |status| is the reason for the failure. 53 // |status| is the reason for the failure, it is |SUCCESS| if no errors.
54 void OnClickFailed(AutocheckoutStatus status); 54 void OnAutocheckoutPageCompleted(AutocheckoutStatus status);
55 55
56 // Sets |page_meta_data_| with the meta data for the current page. 56 // Sets |page_meta_data_| with the meta data for the current page.
57 void OnLoadedPageMetaData( 57 void OnLoadedPageMetaData(
58 scoped_ptr<AutocheckoutPageMetaData> page_meta_data); 58 scoped_ptr<AutocheckoutPageMetaData> page_meta_data);
59 59
60 // Called when a page containing forms is loaded. 60 // Called when a page containing forms is loaded.
61 void OnFormsSeen(); 61 void OnFormsSeen();
62 62
63 // Whether ajax on the current page should be ignored during 63 // Whether ajax on the current page should be ignored during
64 // an Autocheckout flow. 64 // an Autocheckout flow.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // field type specified by |field|. 121 // field type specified by |field|.
122 void SetValue(const AutofillField& field, FormFieldData* field_to_fill); 122 void SetValue(const AutofillField& field, FormFieldData* field_to_fill);
123 123
124 // Sets the progress of all steps for the given page to the provided value. 124 // Sets the progress of all steps for the given page to the provided value.
125 void SetStepProgressForPage(int page_number, AutocheckoutStepStatus status); 125 void SetStepProgressForPage(int page_number, AutocheckoutStepStatus status);
126 126
127 // Account time spent between now and |last_step_completion_timestamp_| 127 // Account time spent between now and |last_step_completion_timestamp_|
128 // towards |page_number|. 128 // towards |page_number|.
129 void RecordTimeTaken(int page_number); 129 void RecordTimeTaken(int page_number);
130 130
131 // Terminate the Autocheckout flow and send Autocheckout status.
132 void EndAutocheckout(AutocheckoutStatus status);
133
131 AutofillManager* autofill_manager_; // WEAK; owns us 134 AutofillManager* autofill_manager_; // WEAK; owns us
132 135
133 // Credit card verification code. 136 // Credit card verification code.
134 base::string16 cvv_; 137 base::string16 cvv_;
135 138
136 // Profile built using the data supplied by requestAutocomplete dialog. 139 // Profile built using the data supplied by requestAutocomplete dialog.
137 scoped_ptr<AutofillProfile> profile_; 140 scoped_ptr<AutofillProfile> profile_;
138 141
139 // Credit card built using the data supplied by requestAutocomplete dialog. 142 // Credit card built using the data supplied by requestAutocomplete dialog.
140 scoped_ptr<CreditCard> credit_card_; 143 scoped_ptr<CreditCard> credit_card_;
(...skipping 29 matching lines...) Expand all
170 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_; 173 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_;
171 174
172 base::ThreadChecker thread_checker_; 175 base::ThreadChecker thread_checker_;
173 176
174 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager); 177 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager);
175 }; 178 };
176 179
177 } // namespace autofill 180 } // namespace autofill
178 181
179 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_ 182 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698