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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "components/autofill/core/browser/autofill_download_manager.h" | 25 #include "components/autofill/core/browser/autofill_download_manager.h" |
26 #include "components/autofill/core/browser/autofill_driver.h" | 26 #include "components/autofill/core/browser/autofill_driver.h" |
27 #include "components/autofill/core/browser/autofill_metrics.h" | 27 #include "components/autofill/core/browser/autofill_metrics.h" |
28 #include "components/autofill/core/browser/card_unmask_delegate.h" | 28 #include "components/autofill/core/browser/card_unmask_delegate.h" |
29 #include "components/autofill/core/browser/form_structure.h" | 29 #include "components/autofill/core/browser/form_structure.h" |
30 #include "components/autofill/core/browser/payments/full_card_request.h" | 30 #include "components/autofill/core/browser/payments/full_card_request.h" |
31 #include "components/autofill/core/browser/payments/payments_client.h" | 31 #include "components/autofill/core/browser/payments/payments_client.h" |
32 #include "components/autofill/core/browser/personal_data_manager.h" | 32 #include "components/autofill/core/browser/personal_data_manager.h" |
33 #include "components/autofill/core/common/form_data.h" | 33 #include "components/autofill/core/common/form_data.h" |
34 | 34 |
| 35 #if defined(OS_ANDROID) |
| 36 #include "components/autofill/core/browser/assist_manager.h" |
| 37 #endif |
| 38 |
35 // This define protects some debugging code (see DumpAutofillData). This | 39 // This define protects some debugging code (see DumpAutofillData). This |
36 // is here to make it easier to delete this code when the test is complete, | 40 // is here to make it easier to delete this code when the test is complete, |
37 // and to prevent adding the code on mobile where there is no desktop (the | 41 // and to prevent adding the code on mobile where there is no desktop (the |
38 // debug dump file is written to the desktop) or command-line flags to enable. | 42 // debug dump file is written to the desktop) or command-line flags to enable. |
39 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) | 43 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
40 #define ENABLE_FORM_DEBUG_DUMP | 44 #define ENABLE_FORM_DEBUG_DUMP |
41 #endif | 45 #endif |
42 | 46 |
43 namespace gfx { | 47 namespace gfx { |
44 class Rect; | 48 class Rect; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // Methods for packing and unpacking credit card and profile IDs for sending | 248 // Methods for packing and unpacking credit card and profile IDs for sending |
245 // and receiving to and from the renderer process. | 249 // and receiving to and from the renderer process. |
246 int MakeFrontendID(const std::string& cc_backend_id, | 250 int MakeFrontendID(const std::string& cc_backend_id, |
247 const std::string& profile_backend_id) const; | 251 const std::string& profile_backend_id) const; |
248 void SplitFrontendID(int frontend_id, | 252 void SplitFrontendID(int frontend_id, |
249 std::string* cc_backend_id, | 253 std::string* cc_backend_id, |
250 std::string* profile_backend_id) const; | 254 std::string* profile_backend_id) const; |
251 | 255 |
252 ScopedVector<FormStructure>* form_structures() { return &form_structures_; } | 256 ScopedVector<FormStructure>* form_structures() { return &form_structures_; } |
253 | 257 |
254 protected: | |
255 // Exposed for testing. | 258 // Exposed for testing. |
256 AutofillExternalDelegate* external_delegate() { | 259 AutofillExternalDelegate* external_delegate() { |
257 return external_delegate_; | 260 return external_delegate_; |
258 } | 261 } |
259 | 262 |
260 // Exposed for testing. | 263 // Exposed for testing. |
261 void set_download_manager(AutofillDownloadManager* manager) { | 264 void set_download_manager(AutofillDownloadManager* manager) { |
262 download_manager_.reset(manager); | 265 download_manager_.reset(manager); |
263 } | 266 } |
264 | 267 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 mutable std::map<std::string, int> backend_to_int_map_; | 531 mutable std::map<std::string, int> backend_to_int_map_; |
529 mutable std::map<int, std::string> int_to_backend_map_; | 532 mutable std::map<int, std::string> int_to_backend_map_; |
530 | 533 |
531 // Delegate to perform external processing (display, selection) on | 534 // Delegate to perform external processing (display, selection) on |
532 // our behalf. Weak. | 535 // our behalf. Weak. |
533 AutofillExternalDelegate* external_delegate_; | 536 AutofillExternalDelegate* external_delegate_; |
534 | 537 |
535 // Delegate used in test to get notifications on certain events. | 538 // Delegate used in test to get notifications on certain events. |
536 AutofillManagerTestDelegate* test_delegate_; | 539 AutofillManagerTestDelegate* test_delegate_; |
537 | 540 |
| 541 #if defined(OS_ANDROID) |
| 542 AssistManager assist_manager_; |
| 543 #endif |
| 544 |
538 base::WeakPtrFactory<AutofillManager> weak_ptr_factory_; | 545 base::WeakPtrFactory<AutofillManager> weak_ptr_factory_; |
539 | 546 |
540 friend class AutofillManagerTest; | 547 friend class AutofillManagerTest; |
541 friend class FormStructureBrowserTest; | 548 friend class FormStructureBrowserTest; |
542 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 549 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
543 DeterminePossibleFieldTypesForUpload); | 550 DeterminePossibleFieldTypesForUpload); |
544 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 551 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
545 DeterminePossibleFieldTypesForUploadStressTest); | 552 DeterminePossibleFieldTypesForUploadStressTest); |
546 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DisambiguateUploadTypes); | 553 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DisambiguateUploadTypes); |
547 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 554 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 609 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
603 DontSaveCvcInAutocompleteHistory); | 610 DontSaveCvcInAutocompleteHistory); |
604 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 611 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
605 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 612 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
606 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 613 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
607 }; | 614 }; |
608 | 615 |
609 } // namespace autofill | 616 } // namespace autofill |
610 | 617 |
611 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 618 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |