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: 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: fix nits 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
« no previous file with comments | « no previous file | components/autofill/content/browser/autocheckout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 that the renderer has completed processing a page in the
53 // |status| is the reason for the failure. 53 // Autocheckout flow. |status| is the reason for the failure, or |SUCCESS| if
54 void OnClickFailed(AutocheckoutStatus status); 54 // there were no errors.
55 void OnAutocheckoutPageCompleted(AutocheckoutStatus status);
55 56
56 // Sets |page_meta_data_| with the meta data for the current page. 57 // Sets |page_meta_data_| with the meta data for the current page.
57 void OnLoadedPageMetaData( 58 void OnLoadedPageMetaData(
58 scoped_ptr<AutocheckoutPageMetaData> page_meta_data); 59 scoped_ptr<AutocheckoutPageMetaData> page_meta_data);
59 60
60 // Called when a page containing forms is loaded. 61 // Called when a page containing forms is loaded.
61 void OnFormsSeen(); 62 void OnFormsSeen();
62 63
63 // Whether ajax on the current page should be ignored during 64 // Whether ajax on the current page should be ignored during
64 // an Autocheckout flow. 65 // an Autocheckout flow.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // field type specified by |field|. 122 // field type specified by |field|.
122 void SetValue(const AutofillField& field, FormFieldData* field_to_fill); 123 void SetValue(const AutofillField& field, FormFieldData* field_to_fill);
123 124
124 // Sets the progress of all steps for the given page to the provided value. 125 // Sets the progress of all steps for the given page to the provided value.
125 void SetStepProgressForPage(int page_number, AutocheckoutStepStatus status); 126 void SetStepProgressForPage(int page_number, AutocheckoutStepStatus status);
126 127
127 // Account time spent between now and |last_step_completion_timestamp_| 128 // Account time spent between now and |last_step_completion_timestamp_|
128 // towards |page_number|. 129 // towards |page_number|.
129 void RecordTimeTaken(int page_number); 130 void RecordTimeTaken(int page_number);
130 131
132 // Terminate the Autocheckout flow and send Autocheckout status to Wallet
133 // server.
134 void EndAutocheckout(AutocheckoutStatus status);
135
131 AutofillManager* autofill_manager_; // WEAK; owns us 136 AutofillManager* autofill_manager_; // WEAK; owns us
132 137
133 // Credit card verification code. 138 // Credit card verification code.
134 base::string16 cvv_; 139 base::string16 cvv_;
135 140
136 // Profile built using the data supplied by requestAutocomplete dialog. 141 // Profile built using the data supplied by requestAutocomplete dialog.
137 scoped_ptr<AutofillProfile> profile_; 142 scoped_ptr<AutofillProfile> profile_;
138 143
139 // Credit card built using the data supplied by requestAutocomplete dialog. 144 // Credit card built using the data supplied by requestAutocomplete dialog.
140 scoped_ptr<CreditCard> credit_card_; 145 scoped_ptr<CreditCard> credit_card_;
(...skipping 29 matching lines...) Expand all
170 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_; 175 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_;
171 176
172 base::ThreadChecker thread_checker_; 177 base::ThreadChecker thread_checker_;
173 178
174 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager); 179 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager);
175 }; 180 };
176 181
177 } // namespace autofill 182 } // namespace autofill
178 183
179 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_ 184 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/browser/autocheckout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698