| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/autofill/autofill_manager.h" | 5 #include "chrome/browser/autofill/autofill_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 AutofillMetrics::USER_DID_EDIT_AUTOFILLED_FIELD_ONCE); | 490 AutofillMetrics::USER_DID_EDIT_AUTOFILLED_FIELD_ONCE); |
| 491 } | 491 } |
| 492 } | 492 } |
| 493 | 493 |
| 494 UpdateInitialInteractionTimestamp(timestamp); | 494 UpdateInitialInteractionTimestamp(timestamp); |
| 495 } | 495 } |
| 496 | 496 |
| 497 void AutofillManager::OnQueryFormFieldAutofill(int query_id, | 497 void AutofillManager::OnQueryFormFieldAutofill(int query_id, |
| 498 const FormData& form, | 498 const FormData& form, |
| 499 const FormFieldData& field, | 499 const FormFieldData& field, |
| 500 const gfx::Rect& bounding_box, | 500 const gfx::RectF& bounding_box, |
| 501 bool display_warning) { | 501 bool display_warning) { |
| 502 std::vector<string16> values; | 502 std::vector<string16> values; |
| 503 std::vector<string16> labels; | 503 std::vector<string16> labels; |
| 504 std::vector<string16> icons; | 504 std::vector<string16> icons; |
| 505 std::vector<int> unique_ids; | 505 std::vector<int> unique_ids; |
| 506 | 506 |
| 507 if (external_delegate_) { | 507 if (external_delegate_) { |
| 508 external_delegate_->OnQuery(query_id, | 508 external_delegate_->OnQuery(query_id, |
| 509 form, | 509 form, |
| 510 field, | 510 field, |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 | 806 |
| 807 void AutofillManager::OnAddPasswordFormMapping( | 807 void AutofillManager::OnAddPasswordFormMapping( |
| 808 const FormFieldData& form, | 808 const FormFieldData& form, |
| 809 const PasswordFormFillData& fill_data) { | 809 const PasswordFormFillData& fill_data) { |
| 810 if (external_delegate_) | 810 if (external_delegate_) |
| 811 external_delegate_->AddPasswordFormMapping(form, fill_data); | 811 external_delegate_->AddPasswordFormMapping(form, fill_data); |
| 812 } | 812 } |
| 813 | 813 |
| 814 void AutofillManager::OnShowPasswordSuggestions( | 814 void AutofillManager::OnShowPasswordSuggestions( |
| 815 const FormFieldData& field, | 815 const FormFieldData& field, |
| 816 const gfx::Rect& bounds, | 816 const gfx::RectF& bounds, |
| 817 const std::vector<string16>& suggestions) { | 817 const std::vector<string16>& suggestions) { |
| 818 if (external_delegate_) | 818 if (external_delegate_) |
| 819 external_delegate_->OnShowPasswordSuggestions(suggestions, field, bounds); | 819 external_delegate_->OnShowPasswordSuggestions(suggestions, field, bounds); |
| 820 } | 820 } |
| 821 | 821 |
| 822 void AutofillManager::OnSetDataList(const std::vector<string16>& values, | 822 void AutofillManager::OnSetDataList(const std::vector<string16>& values, |
| 823 const std::vector<string16>& labels, | 823 const std::vector<string16>& labels, |
| 824 const std::vector<string16>& icons, | 824 const std::vector<string16>& icons, |
| 825 const std::vector<int>& unique_ids) { | 825 const std::vector<int>& unique_ids) { |
| 826 if (labels.size() != values.size() || | 826 if (labels.size() != values.size() || |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 *profile_guid = IDToGUID(profile_id); | 1315 *profile_guid = IDToGUID(profile_id); |
| 1316 } | 1316 } |
| 1317 | 1317 |
| 1318 void AutofillManager::UpdateInitialInteractionTimestamp( | 1318 void AutofillManager::UpdateInitialInteractionTimestamp( |
| 1319 const TimeTicks& interaction_timestamp) { | 1319 const TimeTicks& interaction_timestamp) { |
| 1320 if (initial_interaction_timestamp_.is_null() || | 1320 if (initial_interaction_timestamp_.is_null() || |
| 1321 interaction_timestamp < initial_interaction_timestamp_) { | 1321 interaction_timestamp < initial_interaction_timestamp_) { |
| 1322 initial_interaction_timestamp_ = interaction_timestamp; | 1322 initial_interaction_timestamp_ = interaction_timestamp; |
| 1323 } | 1323 } |
| 1324 } | 1324 } |
| OLD | NEW |