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

Side by Side Diff: components/autofill/core/browser/autofill_manager.h

Issue 329293002: Revert "Revert 3 mac autofill CLs." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 class AutofillManager : public AutofillDownloadManager::Observer { 66 class AutofillManager : public AutofillDownloadManager::Observer {
67 public: 67 public:
68 enum AutofillDownloadManagerState { 68 enum AutofillDownloadManagerState {
69 ENABLE_AUTOFILL_DOWNLOAD_MANAGER, 69 ENABLE_AUTOFILL_DOWNLOAD_MANAGER,
70 DISABLE_AUTOFILL_DOWNLOAD_MANAGER, 70 DISABLE_AUTOFILL_DOWNLOAD_MANAGER,
71 }; 71 };
72 72
73 // Registers our Enable/Disable Autofill pref. 73 // Registers our Enable/Disable Autofill pref.
74 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 74 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
75 75
76 #if defined(OS_MACOSX) && !defined(OS_IOS)
77 static void MigrateUserPrefs(PrefService* prefs);
78 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
79
76 AutofillManager(AutofillDriver* driver, 80 AutofillManager(AutofillDriver* driver,
77 AutofillClient* client, 81 AutofillClient* client,
78 const std::string& app_locale, 82 const std::string& app_locale,
79 AutofillDownloadManagerState enable_download_manager); 83 AutofillDownloadManagerState enable_download_manager);
80 virtual ~AutofillManager(); 84 virtual ~AutofillManager();
81 85
82 // Sets an external delegate. 86 // Sets an external delegate.
83 void SetExternalDelegate(AutofillExternalDelegate* delegate); 87 void SetExternalDelegate(AutofillExternalDelegate* delegate);
84 88
85 void ShowAutofillSettings(); 89 void ShowAutofillSettings();
86 90
91 #if defined(OS_MACOSX) && !defined(OS_IOS)
92 // Whether the field represented by |fieldData| should show an entry to prompt
93 // the user to give Chrome access to the user's address book.
94 bool ShouldShowAccessAddressBookSuggestion(const FormData& data,
95 const FormFieldData& field_data);
96
97 // If Chrome has not prompted for access to the user's address book, the
98 // method prompts the user for permission and blocks the process. Otherwise,
99 // this method has no effect. The return value reflects whether the user was
100 // prompted with a modal dialog.
101 bool AccessAddressBook();
102 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
103
87 // Called from our external delegate so they cannot be private. 104 // Called from our external delegate so they cannot be private.
88 virtual void FillOrPreviewForm(AutofillDriver::RendererFormDataAction action, 105 virtual void FillOrPreviewForm(AutofillDriver::RendererFormDataAction action,
89 int query_id, 106 int query_id,
90 const FormData& form, 107 const FormData& form,
91 const FormFieldData& field, 108 const FormFieldData& field,
92 int unique_id); 109 int unique_id);
93 void DidShowSuggestions(bool is_new_popup); 110 void DidShowSuggestions(bool is_new_popup);
94 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); 111 void OnDidFillAutofillFormData(const base::TimeTicks& timestamp);
95 void OnDidPreviewAutofillFormData(); 112 void OnDidPreviewAutofillFormData();
96 113
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 UserHappinessFormLoadAndSubmission); 372 UserHappinessFormLoadAndSubmission);
356 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); 373 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction);
357 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, 374 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
358 FormSubmittedAutocompleteEnabled); 375 FormSubmittedAutocompleteEnabled);
359 DISALLOW_COPY_AND_ASSIGN(AutofillManager); 376 DISALLOW_COPY_AND_ASSIGN(AutofillManager);
360 }; 377 };
361 378
362 } // namespace autofill 379 } // namespace autofill
363 380
364 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 381 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_external_delegate.cc ('k') | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698