diff options
author | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-05 01:29:14 +0000 |
---|---|---|
committer | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-05 01:29:14 +0000 |
commit | 1ecbe866c38fb6c781d337393b7ff62d0c662f4e (patch) | |
tree | 37ddf68241e68df9035f2c612388369f1539fe4d /chrome/common/form_data.h | |
parent | 456cface8888f0e39742243f25295d55c8922744 (diff) | |
download | chromium_src-1ecbe866c38fb6c781d337393b7ff62d0c662f4e.zip chromium_src-1ecbe866c38fb6c781d337393b7ff62d0c662f4e.tar.gz chromium_src-1ecbe866c38fb6c781d337393b7ff62d0c662f4e.tar.bz2 |
Move forms/ out of webkit/.
The motivation for this CL is to move PasswordForm and friends (which are totally unrelated to WebKit) out of webkit/ and into a target that platforms that do not use WebKit (such as iOS) can logically depend on.
As such, this CL does three things:
1. Separates the WebKit-related code in webkit/forms from the
non-WebKit-related code. Concretely, this means having the WebKit::WebFormElement->PasswordForm conversion function in its own file.
2. Moves the core, non-WebKit-related forms code to chrome/common and content/public/common depending on where its usage points are.
3. Moves the above-mentioned conversion function to content/public/renderer. It cannot stay in webkit/ as it (now) has a dependency on content/, and as it is used only in chrome/renderer and content/renderer, this is a good place for it.
The rest of this CL is churn due to namespace, file location, and GYP target changes.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11000016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160280 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/form_data.h')
-rw-r--r-- | chrome/common/form_data.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/common/form_data.h b/chrome/common/form_data.h new file mode 100644 index 0000000..fd987a8 --- /dev/null +++ b/chrome/common/form_data.h @@ -0,0 +1,37 @@ +// Copyright (c) 2011 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 CHROME_COMMON_FORM_DATA_H__ +#define CHROME_COMMON_FORM_DATA_H__ + +#include <vector> + +#include "base/string16.h" +#include "chrome/common/form_field_data.h" +#include "googleurl/src/gurl.h" + +// Holds information about a form to be filled and/or submitted. +struct FormData { + // The name of the form. + string16 name; + // GET or POST. + string16 method; + // The URL (minus query parameters) containing the form. + GURL origin; + // The action target of the form. + GURL action; + // true if this form was submitted by a user gesture and not javascript. + bool user_submitted; + // A vector of all the input fields in the form. + std::vector<FormFieldData> fields; + + FormData(); + FormData(const FormData& data); + ~FormData(); + + // Used by FormStructureTest. + bool operator==(const FormData& form) const; +}; + +#endif // CHROME_COMMON_FORM_DATA_H__ |