Index: components/autofill/browser/autofill_xml_parser.h |
diff --git a/components/autofill/browser/autofill_xml_parser.h b/components/autofill/browser/autofill_xml_parser.h |
index 4d1498fb5b1d1a2be6cce113262de991183cb3f3..c79b911adb3ebee61b1ee294b3687d18d213a8fd 100644 |
--- a/components/autofill/browser/autofill_xml_parser.h |
+++ b/components/autofill/browser/autofill_xml_parser.h |
@@ -11,6 +11,7 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
+#include "components/autofill/browser/autocheckout_page_meta_data.h" |
#include "components/autofill/browser/autofill_server_field_info.h" |
#include "components/autofill/browser/field_types.h" |
#include "components/autofill/browser/form_structure.h" |
@@ -89,6 +90,25 @@ class AutofillQueryXmlParser : public AutofillXmlParser { |
const char* name, |
const char** attrs) OVERRIDE; |
+ // A helper function to parse a <click_elements_before_formfill> or |
+ // <click_elements_after_formfill>. |
+ // |context| is the current parsing context. |
+ // |attrs| is the list of attributes (names and values) for the element. |
+ // |click_elements| is the list a new |ClickElement| will be appended to. |
+ void ParseClickElement( |
+ buzz::XmlParseContext* context, |
+ const char** attrs, |
+ std::vector<AutocheckoutPageMetaData::ClickElement>* click_elements); |
+ |
+ // A helper function to parse a |WebElementDescriptor|. |
+ // |context| is the current parsing context. |
+ // |attrs| is the list of attributes (names and values) for the element. |
+ // |element_descriptor| will be populated by this function. |
+ WebElementDescriptor* ParseElementDescriptor( |
+ buzz::XmlParseContext* context, |
+ const char** attrs, |
+ WebElementDescriptor* element_descriptor); |
+ |
// A helper function to retrieve integer values from strings. Raises an |
// XML parse error if it fails. |
// |context| is the current parsing context. |
@@ -109,6 +129,9 @@ class AutofillQueryXmlParser : public AutofillXmlParser { |
// Page metadata for multipage autofill flow. |
AutocheckoutPageMetaData* page_meta_data_; |
+ // The click element the parser is currently processing. |
+ AutocheckoutPageMetaData::ClickElement* current_click_element_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AutofillQueryXmlParser); |
}; |