ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / components / autofill / content / renderer / password_form_conversion_utils.h
blob155f77b9d761c5898357e24b609d402c26c74254
1 // Copyright 2013 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.
5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H_
8 #include <map>
10 #include "base/memory/scoped_ptr.h"
12 namespace blink {
13 class WebFormElement;
14 class WebInputElement;
15 class WebString;
18 namespace autofill {
20 struct PasswordForm;
22 // Create a PasswordForm from DOM form. Webkit doesn't allow storing
23 // custom metadata to DOM nodes, so we have to do this every time an event
24 // happens with a given form and compare against previously Create'd forms
25 // to identify..which sucks.
26 // If an element of |form| has an entry in |user_modified_elements|, the
27 // associated string is used instead of the element's value to create
28 // the PasswordForm.
29 scoped_ptr<PasswordForm> CreatePasswordForm(
30 const blink::WebFormElement& form,
31 const std::map<const blink::WebInputElement, blink::WebString>*
32 user_modified_elements);
34 } // namespace autofill
36 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_FORM_CONVERSION_UTILS_H__