OLD | NEW |
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 { |
15 AutocheckoutPageMetaData(); | 17 AutocheckoutPageMetaData(); |
16 ~AutocheckoutPageMetaData(); | 18 ~AutocheckoutPageMetaData(); |
17 | 19 |
(...skipping 11 matching lines...) Expand all Loading... |
29 | 31 |
30 // Page number of the multipage Autofill flow this form belongs to | 32 // 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 | 33 // (zero-indexed). If this form doesn't belong to any autofill flow, it is set |
32 // to -1. | 34 // to -1. |
33 int current_page_number; | 35 int current_page_number; |
34 | 36 |
35 // Total number of pages in the multipage Autofill flow. If this form doesn't | 37 // 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. | 38 // belong to any autofill flow, it is set to -1. |
37 int total_pages; | 39 int total_pages; |
38 | 40 |
| 41 // A list of elements to click before filling form fields. Elements have to be |
| 42 // clicked in order. |
| 43 std::vector<WebElementDescriptor> click_elements_before_form_fill; |
| 44 |
| 45 // A list of elements to click after filling form fields, and before clicking |
| 46 // page_advance_button. Elements have to be clicked in order. |
| 47 std::vector<WebElementDescriptor> click_elements_after_form_fill; |
| 48 |
39 // The proceed element of the multipage Autofill flow. It can be empty | 49 // 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. | 50 // if current page is the last page of a flow or isn't a member of a flow. |
| 51 // |
| 52 // We do expect page navigation when click on |proceed_element_descriptor|, |
| 53 // and report an error if it doesn't. Oppositely, we do not expect page |
| 54 // navigation when click elements in |click_elements_before_form_fill| and |
| 55 // |click_elements_after_form_fill|. Because of this behavior difference and |
| 56 // |proceed_element_descriptor| is optional, we separate it from |
| 57 // |click_elements_after_form_fill|. |
41 WebElementDescriptor proceed_element_descriptor; | 58 WebElementDescriptor proceed_element_descriptor; |
42 | 59 |
43 private: | 60 private: |
44 DISALLOW_COPY_AND_ASSIGN(AutocheckoutPageMetaData); | 61 DISALLOW_COPY_AND_ASSIGN(AutocheckoutPageMetaData); |
45 }; | 62 }; |
46 | 63 |
47 } // namespace autofill | 64 } // namespace autofill |
48 | 65 |
49 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_ | 66 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCHECKOUT_PAGE_META_DATA_H_ |
OLD | NEW |