summaryrefslogtreecommitdiffstats
path: root/webkit/glue/autofill_form.h
blob: 2433e67c44a96d8cd1f4efd9c290a463fbf53ffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBKIT_GLUE_AUTOFILL_FORM_H_
#define WEBKIT_GLUE_AUTOFILL_FORM_H_

#include <string>
#include <vector>

#include "webkit/glue/autofill_form.h"

namespace WebCore {
  class HTMLFormElement;
}

// The AutofillForm struct represents a single HTML form together with the
// values entered in the fields.

class AutofillForm {
 public:
  // Struct for storing name/value pairs.
  struct Element {
    Element() {}
    Element(const std::wstring& in_name, const std::wstring& in_value) {
      name = in_name;
      value = in_value;
    }
    std::wstring name;
    std::wstring value;
  };

  static AutofillForm* CreateAutofillForm(WebCore::HTMLFormElement* form);

  // A vector of all the input fields in the form.
  std::vector<Element> elements;
};

#endif  // WEBKIT_GLUE_AUTOFILL_FORM_H_