1// Copyright (c) 2010 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 WEBKIT_GLUE_FORM_DATA_H__
6#define WEBKIT_GLUE_FORM_DATA_H__
7
8#include <vector>
9
10#ifdef ANDROID
11#include "base/base_api.h"
12#endif
13#include "base/string_util.h"
14#include "googleurl/src/gurl.h"
15#include "webkit/glue/form_field.h"
16
17namespace webkit_glue {
18
19// Holds information about a form to be filled and/or submitted.
20struct
21#ifdef ANDROID
22BASE_API
23#endif
24FormData {
25  // The name of the form.
26  string16 name;
27  // GET or POST.
28  string16 method;
29  // The URL (minus query parameters) containing the form.
30  GURL origin;
31  // The action target of the form.
32  GURL action;
33  // true if this form was submitted by a user gesture and not javascript.
34  bool user_submitted;
35  // A vector of all the input fields in the form.
36  std::vector<FormField> fields;
37
38  FormData();
39  FormData(const FormData& data);
40  ~FormData();
41
42  // Used by FormStructureTest.
43  bool operator==(const FormData& form) const;
44};
45
46}  // namespace webkit_glue
47
48#endif  // WEBKIT_GLUE_FORM_DATA_H__
49