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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 // Only remember the last few forms that we've seen, both to avoid false | 633 // Only remember the last few forms that we've seen, both to avoid false |
634 // positives and to avoid wasting memory. | 634 // positives and to avoid wasting memory. |
635 if (autofilled_form_signatures_.size() > kMaxRecentFormSignaturesToRemember) | 635 if (autofilled_form_signatures_.size() > kMaxRecentFormSignaturesToRemember) |
636 autofilled_form_signatures_.pop_back(); | 636 autofilled_form_signatures_.pop_back(); |
637 | 637 |
638 host->Send(new AutofillMsg_FormDataFilled( | 638 host->Send(new AutofillMsg_FormDataFilled( |
639 host->GetRoutingID(), query_id, result)); | 639 host->GetRoutingID(), query_id, result)); |
640 } | 640 } |
641 | 641 |
642 void AutofillManager::OnShowAutofillDialog() { | 642 void AutofillManager::OnShowAutofillDialog() { |
| 643 #if defined(OS_ANDROID) |
| 644 NOTIMPLEMENTED(); |
| 645 #else |
643 Browser* browser = BrowserList::GetLastActiveWithProfile( | 646 Browser* browser = BrowserList::GetLastActiveWithProfile( |
644 Profile::FromBrowserContext(web_contents()->GetBrowserContext())); | 647 Profile::FromBrowserContext(web_contents()->GetBrowserContext())); |
645 if (browser) | 648 if (browser) |
646 browser->ShowOptionsTab(chrome::kAutofillSubPage); | 649 browser->ShowOptionsTab(chrome::kAutofillSubPage); |
| 650 #endif // #if defined(OS_ANDROID) |
647 } | 651 } |
648 | 652 |
649 void AutofillManager::OnDidPreviewAutofillFormData() { | 653 void AutofillManager::OnDidPreviewAutofillFormData() { |
650 content::NotificationService::current()->Notify( | 654 content::NotificationService::current()->Notify( |
651 chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA, | 655 chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA, |
652 content::Source<RenderViewHost>(web_contents()->GetRenderViewHost()), | 656 content::Source<RenderViewHost>(web_contents()->GetRenderViewHost()), |
653 content::NotificationService::NoDetails()); | 657 content::NotificationService::NoDetails()); |
654 } | 658 } |
655 | 659 |
656 void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) { | 660 void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) { |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 *profile_guid = IDToGUID(profile_id); | 1305 *profile_guid = IDToGUID(profile_id); |
1302 } | 1306 } |
1303 | 1307 |
1304 void AutofillManager::UpdateInitialInteractionTimestamp( | 1308 void AutofillManager::UpdateInitialInteractionTimestamp( |
1305 const TimeTicks& interaction_timestamp) { | 1309 const TimeTicks& interaction_timestamp) { |
1306 if (initial_interaction_timestamp_.is_null() || | 1310 if (initial_interaction_timestamp_.is_null() || |
1307 interaction_timestamp < initial_interaction_timestamp_) { | 1311 interaction_timestamp < initial_interaction_timestamp_) { |
1308 initial_interaction_timestamp_ = interaction_timestamp; | 1312 initial_interaction_timestamp_ = interaction_timestamp; |
1309 } | 1313 } |
1310 } | 1314 } |
OLD | NEW |