Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: chrome/browser/autofill/autofill_manager.cc

Issue 12188020: Adding the page and DPI scale adjustment for Autofill Popups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Autofill unittests Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 798
799 void AutofillManager::OnAddPasswordFormMapping( 799 void AutofillManager::OnAddPasswordFormMapping(
800 const FormFieldData& form, 800 const FormFieldData& form,
801 const PasswordFormFillData& fill_data) { 801 const PasswordFormFillData& fill_data) {
802 if (external_delegate_) 802 if (external_delegate_)
803 external_delegate_->AddPasswordFormMapping(form, fill_data); 803 external_delegate_->AddPasswordFormMapping(form, fill_data);
804 } 804 }
805 805
806 void AutofillManager::OnShowPasswordSuggestions( 806 void AutofillManager::OnShowPasswordSuggestions(
807 const FormFieldData& field, 807 const FormFieldData& field,
808 const gfx::Rect& bounds, 808 const gfx::RectF& bounds,
809 const std::vector<string16>& suggestions) { 809 const std::vector<string16>& suggestions) {
810 if (external_delegate_) 810 if (external_delegate_)
811 external_delegate_->OnShowPasswordSuggestions(suggestions, field, bounds); 811 external_delegate_->OnShowPasswordSuggestions(suggestions, field, bounds);
812 } 812 }
813 813
814 void AutofillManager::OnSetDataList(const std::vector<string16>& values, 814 void AutofillManager::OnSetDataList(const std::vector<string16>& values,
815 const std::vector<string16>& labels, 815 const std::vector<string16>& labels,
816 const std::vector<string16>& icons, 816 const std::vector<string16>& icons,
817 const std::vector<int>& unique_ids) { 817 const std::vector<int>& unique_ids) {
818 if (labels.size() != values.size() || 818 if (labels.size() != values.size() ||
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 *profile_guid = IDToGUID(profile_id); 1307 *profile_guid = IDToGUID(profile_id);
1308 } 1308 }
1309 1309
1310 void AutofillManager::UpdateInitialInteractionTimestamp( 1310 void AutofillManager::UpdateInitialInteractionTimestamp(
1311 const TimeTicks& interaction_timestamp) { 1311 const TimeTicks& interaction_timestamp) {
1312 if (initial_interaction_timestamp_.is_null() || 1312 if (initial_interaction_timestamp_.is_null() ||
1313 interaction_timestamp < initial_interaction_timestamp_) { 1313 interaction_timestamp < initial_interaction_timestamp_) {
1314 initial_interaction_timestamp_ = interaction_timestamp; 1314 initial_interaction_timestamp_ = interaction_timestamp;
1315 } 1315 }
1316 } 1316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698