Home | History | Annotate | Download | only in common
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H__
      6 #define COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H__
      7 
      8 #include <vector>
      9 
     10 #include "base/strings/string16.h"
     11 #include "components/autofill/core/common/form_field_data.h"
     12 #include "url/gurl.h"
     13 
     14 namespace autofill {
     15 
     16 // Holds information about a form to be filled and/or submitted.
     17 struct FormData {
     18   FormData();
     19   FormData(const FormData& data);
     20   ~FormData();
     21 
     22   // Used by FormStructureTest.
     23   bool operator==(const FormData& form) const;
     24   bool operator!=(const FormData& form) const;
     25 
     26   // The name of the form.
     27   base::string16 name;
     28   // GET or POST.
     29   base::string16 method;
     30   // The URL (minus query parameters) containing the form.
     31   GURL origin;
     32   // The action target of the form.
     33   GURL action;
     34   // true if this form was submitted by a user gesture and not javascript.
     35   bool user_submitted;
     36   // A vector of all the input fields in the form.
     37   std::vector<FormFieldData> fields;
     38 };
     39 
     40 }  // namespace autofill
     41 
     42 #endif  // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H__
     43