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 #include "components/autofill/content/renderer/password_generation_agent.h" | 5 #include "components/autofill/content/renderer/password_generation_agent.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "components/autofill/content/common/autofill_messages.h" | 10 #include "components/autofill/content/common/autofill_messages.h" |
11 #include "components/autofill/content/renderer/form_autofill_util.h" | 11 #include "components/autofill/content/renderer/form_autofill_util.h" |
12 #include "components/autofill/content/renderer/password_form_conversion_utils.h" | 12 #include "components/autofill/content/renderer/password_form_conversion_utils.h" |
13 #include "components/autofill/core/common/autofill_switches.h" | 13 #include "components/autofill/core/common/autofill_switches.h" |
14 #include "components/autofill/core/common/form_data.h" | 14 #include "components/autofill/core/common/form_data.h" |
15 #include "components/autofill/core/common/password_form.h" | 15 #include "components/autofill/core/common/password_form.h" |
16 #include "components/autofill/core/common/password_generation_util.h" | 16 #include "components/autofill/core/common/password_generation_util.h" |
17 #include "content/public/renderer/render_frame.h" | 17 #include "content/public/renderer/render_frame.h" |
18 #include "content/public/renderer/render_view.h" | 18 #include "content/public/renderer/render_view.h" |
19 #include "google_apis/gaia/gaia_urls.h" | 19 #include "google_apis/gaia/gaia_urls.h" |
20 #include "third_party/WebKit/public/platform/WebVector.h" | 20 #include "third_party/WebKit/public/platform/WebVector.h" |
21 #include "third_party/WebKit/public/web/WebDocument.h" | 21 #include "third_party/WebKit/public/web/WebDocument.h" |
22 #include "third_party/WebKit/public/web/WebFormElement.h" | 22 #include "third_party/WebKit/public/web/WebFormElement.h" |
23 #include "third_party/WebKit/public/web/WebInputElement.h" | 23 #include "third_party/WebKit/public/web/WebInputElement.h" |
24 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 24 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
25 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 25 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
26 #include "third_party/WebKit/public/web/WebView.h" | 26 #include "third_party/WebKit/public/web/WebView.h" |
27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/geometry/rect.h" |
28 | 28 |
29 namespace autofill { | 29 namespace autofill { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // Returns true if we think that this form is for account creation. |passwords| | 33 // Returns true if we think that this form is for account creation. |passwords| |
34 // is filled with the password field(s) in the form. | 34 // is filled with the password field(s) in the form. |
35 bool GetAccountCreationPasswordFields( | 35 bool GetAccountCreationPasswordFields( |
36 const blink::WebFormElement& form, | 36 const blink::WebFormElement& form, |
37 std::vector<blink::WebInputElement>* passwords) { | 37 std::vector<blink::WebInputElement>* passwords) { |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 *possible_account_creation_form_)); | 399 *possible_account_creation_form_)); |
400 | 400 |
401 editing_popup_shown_ = true; | 401 editing_popup_shown_ = true; |
402 } | 402 } |
403 | 403 |
404 void PasswordGenerationAgent::HidePopup() { | 404 void PasswordGenerationAgent::HidePopup() { |
405 Send(new AutofillHostMsg_HidePasswordGenerationPopup(routing_id())); | 405 Send(new AutofillHostMsg_HidePasswordGenerationPopup(routing_id())); |
406 } | 406 } |
407 | 407 |
408 } // namespace autofill | 408 } // namespace autofill |
OLD | NEW |