Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 // ref portions of URL | 79 // ref portions of URL |
| 80 GURL StripAuthAndParams(const GURL& gurl); | 80 GURL StripAuthAndParams(const GURL& gurl); |
| 81 | 81 |
| 82 // Extract FormData from the form element and return whether the operation was | 82 // Extract FormData from the form element and return whether the operation was |
| 83 // successful. | 83 // successful. |
| 84 bool ExtractFormData(const blink::WebFormElement& form_element, FormData* data); | 84 bool ExtractFormData(const blink::WebFormElement& form_element, FormData* data); |
| 85 | 85 |
| 86 // Helper function to check if there exist any visible form on |frame| which | 86 // Helper function to check if there exist any visible form on |frame| which |
| 87 // equals |form_element|. If |form_element| is null, checks if forms action | 87 // equals |form_element|. If |form_element| is null, checks if forms action |
| 88 // equals |action|. Returns true if so. For forms with empty or unspecified | 88 // equals |action|. Returns true if so. For forms with empty or unspecified |
| 89 // actions, all form data are used for comparison. Form data comparison is | 89 // actions, all form data are used for comparison. |
| 90 // disabled on Mac and Android because the update prompt isn't implemented. It | |
| 91 // may cause many false password updates. | |
| 92 // TODO(kolos) Turn on all data comparing when the update prompt will be | |
| 93 // implemented on Mac and Android. | |
|
dvadym
2017/03/23 12:37:09
This comment is obsolete, implementation of IsForm
vabr (Chromium)
2017/03/23 20:09:30
Acknowledged.
| |
| 94 bool IsFormVisible(blink::WebFrame* frame, | 90 bool IsFormVisible(blink::WebFrame* frame, |
| 95 const blink::WebFormElement& form_element, | 91 const blink::WebFormElement& form_element, |
| 96 const GURL& action, | 92 const GURL& action, |
| 97 const GURL& origin, | 93 const GURL& origin, |
| 98 const FormData& form_data); | 94 const FormData& form_data); |
| 99 | 95 |
| 100 // Returns true if at least one element from |control_elements| is visible. | 96 // Returns true if at least one element from |control_elements| is visible. |
| 101 bool IsSomeControlElementVisible( | 97 bool IsSomeControlElementVisible( |
| 102 const blink::WebVector<blink::WebFormControlElement>& control_elements); | 98 const blink::WebVector<blink::WebFormControlElement>& control_elements); |
| 103 | 99 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 // |input_element|. Note that |user_input| cannot be easily derived from | 270 // |input_element|. Note that |user_input| cannot be easily derived from |
| 275 // |input_element| by calling value(), because of http://crbug.com/507714. | 271 // |input_element| by calling value(), because of http://crbug.com/507714. |
| 276 void PreviewSuggestion(const base::string16& suggestion, | 272 void PreviewSuggestion(const base::string16& suggestion, |
| 277 const base::string16& user_input, | 273 const base::string16& user_input, |
| 278 blink::WebFormControlElement* input_element); | 274 blink::WebFormControlElement* input_element); |
| 279 | 275 |
| 280 } // namespace form_util | 276 } // namespace form_util |
| 281 } // namespace autofill | 277 } // namespace autofill |
| 282 | 278 |
| 283 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ | 279 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_FORM_AUTOFILL_UTIL_H_ |
| OLD | NEW |