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_autofill_agent.h" | 5 #include "components/autofill/content/renderer/password_autofill_agent.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 blink::WebInputElement selected_element = user_input; | 615 blink::WebInputElement selected_element = user_input; |
616 gfx::Rect bounding_box(selected_element.boundsInViewportSpace()); | 616 gfx::Rect bounding_box(selected_element.boundsInViewportSpace()); |
617 | 617 |
618 float scale = web_view_->pageScaleFactor(); | 618 float scale = web_view_->pageScaleFactor(); |
619 gfx::RectF bounding_box_scaled(bounding_box.x() * scale, | 619 gfx::RectF bounding_box_scaled(bounding_box.x() * scale, |
620 bounding_box.y() * scale, | 620 bounding_box.y() * scale, |
621 bounding_box.width() * scale, | 621 bounding_box.width() * scale, |
622 bounding_box.height() * scale); | 622 bounding_box.height() * scale); |
623 Send(new AutofillHostMsg_ShowPasswordSuggestions(routing_id(), | 623 Send(new AutofillHostMsg_ShowPasswordSuggestions(routing_id(), |
624 field, | 624 field, |
| 625 user_input.form(), |
625 bounding_box_scaled, | 626 bounding_box_scaled, |
626 suggestions, | 627 suggestions, |
627 realms)); | 628 realms)); |
628 return !suggestions.empty(); | 629 return !suggestions.empty(); |
629 } | 630 } |
630 | 631 |
631 void PasswordAutofillAgent::FillFormOnPasswordRecieved( | 632 void PasswordAutofillAgent::FillFormOnPasswordRecieved( |
632 const PasswordFormFillData& fill_data, | 633 const PasswordFormFillData& fill_data, |
633 blink::WebInputElement username_element, | 634 blink::WebInputElement username_element, |
634 blink::WebInputElement password_element) { | 635 blink::WebInputElement password_element) { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 } | 825 } |
825 | 826 |
826 PasswordAutofillAgent::AutofillWebUserGestureHandler:: | 827 PasswordAutofillAgent::AutofillWebUserGestureHandler:: |
827 AutofillWebUserGestureHandler(PasswordAutofillAgent* agent) | 828 AutofillWebUserGestureHandler(PasswordAutofillAgent* agent) |
828 : agent_(agent) {} | 829 : agent_(agent) {} |
829 | 830 |
830 PasswordAutofillAgent::AutofillWebUserGestureHandler:: | 831 PasswordAutofillAgent::AutofillWebUserGestureHandler:: |
831 ~AutofillWebUserGestureHandler() {} | 832 ~AutofillWebUserGestureHandler() {} |
832 | 833 |
833 } // namespace autofill | 834 } // namespace autofill |
OLD | NEW |