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

Side by Side Diff: components/autofill/browser/autocheckout_page_meta_data.h

Issue 15487004: Autocheckout: parse multiple clicks setting in autofill response. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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/browser/autofill_xml_parser.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_
7 7
8 #include <vector>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "components/autofill/common/web_element_descriptor.h" 11 #include "components/autofill/common/web_element_descriptor.h"
10 12
11 namespace autofill { 13 namespace autofill {
12 14
13 // Container for multipage Autocheckout data. 15 // Container for multipage Autocheckout data.
14 struct AutocheckoutPageMetaData { 16 struct AutocheckoutPageMetaData {
17 struct ClickElement{
18 WebElementDescriptor web_element;
19 // The time to wait after click the element which gives merchant's script a
20 // chance to execute. Usually we do not need to wait, but set it wisely if
21 // it is required.
22 int wait_time_ms;
Ilya Sherman 2013/05/21 04:25:04 How are the times chosen? What guarantees that th
benquan 2013/05/21 17:17:08 You are absolutely correct, the time required to c
Ilya Sherman 2013/05/21 22:48:41 By this, you mean that for the majority of the sit
23 };
24
15 AutocheckoutPageMetaData(); 25 AutocheckoutPageMetaData();
16 ~AutocheckoutPageMetaData(); 26 ~AutocheckoutPageMetaData();
17 27
18 // Returns true if the Autofill server says that the current page is start of 28 // Returns true if the Autofill server says that the current page is start of
19 // a multipage Autofill flow. 29 // a multipage Autofill flow.
20 bool IsStartOfAutofillableFlow() const; 30 bool IsStartOfAutofillableFlow() const;
21 31
22 // Returns true if the Autofill server says that the current page is in a 32 // Returns true if the Autofill server says that the current page is in a
23 // multipage Autofill flow. 33 // multipage Autofill flow.
24 bool IsInAutofillableFlow() const; 34 bool IsInAutofillableFlow() const;
25 35
26 // Returns true if the Autofill server says that the current page is the end 36 // Returns true if the Autofill server says that the current page is the end
27 // of a multipage Autofill flow. 37 // of a multipage Autofill flow.
28 bool IsEndOfAutofillableFlow() const; 38 bool IsEndOfAutofillableFlow() const;
29 39
30 // Page number of the multipage Autofill flow this form belongs to 40 // Page number of the multipage Autofill flow this form belongs to
31 // (zero-indexed). If this form doesn't belong to any autofill flow, it is set 41 // (zero-indexed). If this form doesn't belong to any autofill flow, it is set
32 // to -1. 42 // to -1.
33 int current_page_number; 43 int current_page_number;
34 44
35 // Total number of pages in the multipage Autofill flow. If this form doesn't 45 // Total number of pages in the multipage Autofill flow. If this form doesn't
36 // belong to any autofill flow, it is set to -1. 46 // belong to any autofill flow, it is set to -1.
37 int total_pages; 47 int total_pages;
38 48
49 // A list of elements to click before filling form fields.
50 // Elements have to be clicked in order, and may wait between clicks.
51 std::vector<ClickElement> click_elements_before_formfill;
52
53 // A list of elements to click after filling form fields, and before clicking
54 // page_advance_button.
55 // Elements have to be clicked in order, and may wait between clicks.
56 std::vector<ClickElement> click_elements_after_formfill;
57
39 // The proceed element of the multipage Autofill flow. It can be empty 58 // The proceed element of the multipage Autofill flow. It can be empty
40 // if current page is the last page of a flow or isn't a member of a flow. 59 // if current page is the last page of a flow or isn't a member of a flow.
41 WebElementDescriptor proceed_element_descriptor; 60 WebElementDescriptor proceed_element_descriptor;
42 61
43 private: 62 private:
44 DISALLOW_COPY_AND_ASSIGN(AutocheckoutPageMetaData); 63 DISALLOW_COPY_AND_ASSIGN(AutocheckoutPageMetaData);
45 }; 64 };
46 65
47 } // namespace autofill 66 } // namespace autofill
48 67
49 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_ 68 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | components/autofill/browser/autofill_xml_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698