Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1351)

Side by Side Diff: webkit/glue/form_data.h

Issue 3251007: Revert 53686 - Merge 53350 - AutoFill: Record whether the user initiated the ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/form_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 WEBKIT_GLUE_FORM_DATA_H__ 5 #ifndef WEBKIT_GLUE_FORM_DATA_H__
6 #define WEBKIT_GLUE_FORM_DATA_H__ 6 #define WEBKIT_GLUE_FORM_DATA_H__
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "webkit/glue/form_field.h" 12 #include "webkit/glue/form_field.h"
13 13
14 namespace webkit_glue { 14 namespace webkit_glue {
15 15
16 // Holds information about a form to be filled and/or submitted. 16 // Holds information about a form to be filled and/or submitted.
17 struct FormData { 17 struct FormData {
18 // The name of the form. 18 // The name of the form.
19 string16 name; 19 string16 name;
20 // GET or POST. 20 // GET or POST.
21 string16 method; 21 string16 method;
22 // The URL (minus query parameters) containing the form. 22 // The URL (minus query parameters) containing the form.
23 GURL origin; 23 GURL origin;
24 // The action target of the form. 24 // The action target of the form.
25 GURL action; 25 GURL action;
26 // true if this form was submitted by a user gesture and not javascript.
27 bool user_submitted;
28 // A vector of all the input fields in the form. 26 // A vector of all the input fields in the form.
29 std::vector<FormField> fields; 27 std::vector<FormField> fields;
30 28
31 FormData() : user_submitted(false) {} 29 FormData() : user_submitted(false) {}
32 30
33 // Used by FormStructureTest. 31 // Used by FormStructureTest.
34 inline bool operator==(const FormData& form) const { 32 inline bool operator==(const FormData& form) const {
35 return (name == form.name && 33 return (name == form.name &&
36 StringToLowerASCII(method) == StringToLowerASCII(form.method) && 34 StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
37 origin == form.origin && 35 origin == form.origin &&
38 action == form.action && 36 action == form.action &&
39 user_submitted == form.user_submitted &&
40 fields == form.fields); 37 fields == form.fields);
41 } 38 }
42 }; 39 };
43 40
44 } // namespace webkit_glue 41 } // namespace webkit_glue
45 42
46 #endif // WEBKIT_GLUE_FORM_DATA_H__ 43 #endif // WEBKIT_GLUE_FORM_DATA_H__
OLDNEW
« no previous file with comments | « chrome/renderer/form_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698