| Index: chrome/common/password_form_fill_data.h
|
| diff --git a/webkit/forms/password_form_dom_manager.h b/chrome/common/password_form_fill_data.h
|
| similarity index 35%
|
| rename from webkit/forms/password_form_dom_manager.h
|
| rename to chrome/common/password_form_fill_data.h
|
| index 30abb7489b1c26a877b07fed0841d9b54508a6bf..2cb0c284a8a664b3fa38797ed11e36d68c3b2ded 100644
|
| --- a/webkit/forms/password_form_dom_manager.h
|
| +++ b/chrome/common/password_form_fill_data.h
|
| @@ -1,23 +1,17 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright 2012 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_FORMS_PASSWORD_FORM_DOM_MANAGER_H_
|
| -#define WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H_
|
| +#ifndef CHROME_COMMON_PASSWORD_FORM_FILL_DATA_H_
|
| +#define CHROME_COMMON_PASSWORD_FORM_FILL_DATA_H_
|
|
|
| #include <map>
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "webkit/forms/form_data.h"
|
| -#include "webkit/forms/password_form.h"
|
| -#include "webkit/forms/webkit_forms_export.h"
|
| +#include "chrome/common/form_data.h"
|
| +#include "content/public/common/password_form.h"
|
|
|
| -namespace WebKit {
|
| -class WebForm;
|
| -}
|
| -
|
| -namespace webkit {
|
| -namespace forms {
|
| +namespace chrome {
|
|
|
| // Structure used for autofilling password forms.
|
| // basic_data identifies the HTML form on the page and preferred username/
|
| @@ -28,7 +22,7 @@ namespace forms {
|
| // unless the PasswordManager determined there is an additional risk
|
| // associated with this form. This can happen, for example, if action URI's
|
| // of the observed form and our saved representation don't match up.
|
| -struct WEBKIT_FORMS_EXPORT PasswordFormFillData {
|
| +struct PasswordFormFillData {
|
| typedef std::map<string16, string16> LoginCollection;
|
|
|
| FormData basic_data;
|
| @@ -38,31 +32,19 @@ struct WEBKIT_FORMS_EXPORT PasswordFormFillData {
|
| ~PasswordFormFillData();
|
| };
|
|
|
| -class PasswordFormDomManager {
|
| - public:
|
| - // Create a PasswordForm from DOM form. Webkit doesn't allow storing
|
| - // custom metadata to DOM nodes, so we have to do this every time an event
|
| - // happens with a given form and compare against previously Create'd forms
|
| - // to identify..which sucks.
|
| - WEBKIT_FORMS_EXPORT static scoped_ptr<PasswordForm> CreatePasswordForm(
|
| - const WebKit::WebFormElement& form);
|
| -
|
| - // Create a FillData structure in preparation for autofilling a form,
|
| - // from basic_data identifying which form to fill, and a collection of
|
| - // matching stored logins to use as username/password values.
|
| - // preferred_match should equal (address) one of matches.
|
| - // wait_for_username_before_autofill is true if we should not autofill
|
| - // anything until the user typed in a valid username and blurred the field.
|
| - WEBKIT_FORMS_EXPORT static void InitFillData(const PasswordForm& form_on_page,
|
| - const PasswordFormMap& matches,
|
| - const PasswordForm* const preferred_match,
|
| - bool wait_for_username_before_autofill,
|
| - PasswordFormFillData* result);
|
| - private:
|
| - DISALLOW_IMPLICIT_CONSTRUCTORS(PasswordFormDomManager);
|
| -};
|
| -
|
| -} // namespace forms
|
| -} // namespace webkit
|
| -
|
| -#endif // WEBKIT_FORMS_PASSWORD_FORM_DOM_MANAGER_H__
|
| +// Create a FillData structure in preparation for autofilling a form,
|
| +// from basic_data identifying which form to fill, and a collection of
|
| +// matching stored logins to use as username/password values.
|
| +// preferred_match should equal (address) one of matches.
|
| +// wait_for_username_before_autofill is true if we should not autofill
|
| +// anything until the user typed in a valid username and blurred the field.
|
| +void InitPasswordFormFillData(
|
| + const content::PasswordForm& form_on_page,
|
| + const content::PasswordFormMap& matches,
|
| + const content::PasswordForm* const preferred_match,
|
| + bool wait_for_username_before_autofill,
|
| + PasswordFormFillData* result);
|
| +
|
| +} // namespace chrome
|
| +
|
| +#endif // CHROME_COMMON_PASSWORD_FORM_FILL_DATA_H__
|
|
|