Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 class AutofillProfile; | 33 class AutofillProfile; |
| 34 class AutofillMetrics; | 34 class AutofillMetrics; |
| 35 class CreditCard; | 35 class CreditCard; |
| 36 class PersonalDataManager; | 36 class PersonalDataManager; |
| 37 class PrefService; | 37 class PrefService; |
| 38 class ProfileSyncService; | 38 class ProfileSyncService; |
| 39 class TabContentsWrapper; | 39 class TabContentsWrapper; |
| 40 | 40 |
| 41 struct ViewHostMsg_FrameNavigate_Params; | 41 struct ViewHostMsg_FrameNavigate_Params; |
| 42 | 42 |
| 43 namespace autofill { | |
| 44 class PasswordGenerator; | |
| 45 } | |
| 46 | |
| 43 namespace content { | 47 namespace content { |
| 44 class RenderViewHost; | 48 class RenderViewHost; |
| 45 } | 49 } |
| 46 | 50 |
| 47 namespace gfx { | 51 namespace gfx { |
| 48 class Rect; | 52 class Rect; |
| 49 } | 53 } |
| 50 | 54 |
| 51 namespace IPC { | 55 namespace IPC { |
| 52 class Message; | 56 class Message; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 | 90 |
| 87 // Called from our external delegate so they cannot be private. | 91 // Called from our external delegate so they cannot be private. |
| 88 virtual void OnFillAutofillFormData(int query_id, | 92 virtual void OnFillAutofillFormData(int query_id, |
| 89 const webkit::forms::FormData& form, | 93 const webkit::forms::FormData& form, |
| 90 const webkit::forms::FormField& field, | 94 const webkit::forms::FormField& field, |
| 91 int unique_id); | 95 int unique_id); |
| 92 void OnDidShowAutofillSuggestions(bool is_new_popup); | 96 void OnDidShowAutofillSuggestions(bool is_new_popup); |
| 93 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); | 97 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); |
| 94 void OnShowAutofillDialog(); | 98 void OnShowAutofillDialog(); |
| 95 void OnDidPreviewAutofillFormData(); | 99 void OnDidPreviewAutofillFormData(); |
| 96 void OnShowPasswordGenerationPopup(const gfx::Rect& bounds); | 100 void OnShowPasswordGenerationPopup(const gfx::Rect& bounds, int max_length); |
| 97 | 101 |
| 98 // Remove the credit card or Autofill profile that matches |unique_id| | 102 // Remove the credit card or Autofill profile that matches |unique_id| |
| 99 // from the database. | 103 // from the database. |
| 100 void RemoveAutofillProfileOrCreditCard(int unique_id); | 104 void RemoveAutofillProfileOrCreditCard(int unique_id); |
| 101 | 105 |
| 102 protected: | 106 protected: |
| 103 // Only test code should subclass AutofillManager. | 107 // Only test code should subclass AutofillManager. |
| 104 friend class base::RefCounted<AutofillManager>; | 108 friend class base::RefCounted<AutofillManager>; |
| 105 virtual ~AutofillManager(); | 109 virtual ~AutofillManager(); |
| 106 | 110 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 base::TimeTicks initial_interaction_timestamp_; | 355 base::TimeTicks initial_interaction_timestamp_; |
| 352 // If password generation is enabled. We cache this value so that we don't | 356 // If password generation is enabled. We cache this value so that we don't |
| 353 // spam the renderer with messages during startup when the sync state | 357 // spam the renderer with messages during startup when the sync state |
| 354 // is changing rapidly. | 358 // is changing rapidly. |
| 355 bool password_generation_enabled_; | 359 bool password_generation_enabled_; |
| 356 // The ProfileSyncService associated with this tab. This may be NULL in | 360 // The ProfileSyncService associated with this tab. This may be NULL in |
| 357 // testing. | 361 // testing. |
| 358 base::WeakPtr<ProfileSyncService> sync_service_; | 362 base::WeakPtr<ProfileSyncService> sync_service_; |
| 359 // Listens for changes to the 'enabled' state for password generation. | 363 // Listens for changes to the 'enabled' state for password generation. |
| 360 PrefChangeRegistrar registrar_; | 364 PrefChangeRegistrar registrar_; |
| 365 // To be passed to the Password Generation UI to generate the password. | |
|
Ilya Sherman
2012/06/04 22:49:15
nit: "password generation" probably shouldn't be c
zysxqn
2012/06/04 23:17:19
Done.
| |
| 366 scoped_ptr<autofill::PasswordGenerator> password_generator_; | |
| 361 | 367 |
| 362 // Our copy of the form data. | 368 // Our copy of the form data. |
| 363 ScopedVector<FormStructure> form_structures_; | 369 ScopedVector<FormStructure> form_structures_; |
| 364 | 370 |
| 365 // GUID to ID mapping. We keep two maps to convert back and forth. | 371 // GUID to ID mapping. We keep two maps to convert back and forth. |
| 366 mutable std::map<GUIDPair, int> guid_id_map_; | 372 mutable std::map<GUIDPair, int> guid_id_map_; |
| 367 mutable std::map<int, GUIDPair> id_guid_map_; | 373 mutable std::map<int, GUIDPair> id_guid_map_; |
| 368 | 374 |
| 369 // Delegate to perform external processing (display, selection) on | 375 // Delegate to perform external processing (display, selection) on |
| 370 // our behalf. Weak. | 376 // our behalf. Weak. |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 389 TestTabContentsWithExternalDelegate); | 395 TestTabContentsWithExternalDelegate); |
| 390 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 396 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
| 391 UserHappinessFormLoadAndSubmission); | 397 UserHappinessFormLoadAndSubmission); |
| 392 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 398 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
| 393 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration); | 399 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FormFillDuration); |
| 394 | 400 |
| 395 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 401 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 396 }; | 402 }; |
| 397 | 403 |
| 398 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ | 404 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| OLD | NEW |