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

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

Issue 71683003: Have AutofillManagerDelegate supply the AutofillWebDataService to core code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 7 years, 1 month 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
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_DELEGATE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Rect; 16 class Rect;
17 class RectF; 17 class RectF;
18 } 18 }
19 19
20 class GURL; 20 class GURL;
21 class InfoBarService; 21 class InfoBarService;
22 class PrefService; 22 class PrefService;
23 23
24 namespace autofill { 24 namespace autofill {
25 25
26 class AutofillMetrics; 26 class AutofillMetrics;
27 class AutofillPopupDelegate; 27 class AutofillPopupDelegate;
28 class AutofillWebDataService;
28 class CreditCard; 29 class CreditCard;
29 class FormStructure; 30 class FormStructure;
30 class PasswordGenerator; 31 class PasswordGenerator;
31 class PersonalDataManager; 32 class PersonalDataManager;
32 struct FormData; 33 struct FormData;
33 struct PasswordForm; 34 struct PasswordForm;
34 35
35 // A delegate interface that needs to be supplied to AutofillManager 36 // A delegate interface that needs to be supplied to AutofillManager
36 // by the embedder. 37 // by the embedder.
37 // 38 //
38 // Each delegate instance is associated with a given context within 39 // Each delegate instance is associated with a given context within
39 // which an AutofillManager is used (e.g. a single tab), so when we 40 // which an AutofillManager is used (e.g. a single tab), so when we
40 // say "for the delegate" below, we mean "in the execution context the 41 // say "for the delegate" below, we mean "in the execution context the
41 // delegate is associated with" (e.g. for the tab the AutofillManager is 42 // delegate is associated with" (e.g. for the tab the AutofillManager is
42 // attached to). 43 // attached to).
43 class AutofillManagerDelegate { 44 class AutofillManagerDelegate {
44 public: 45 public:
45 virtual ~AutofillManagerDelegate() {} 46 virtual ~AutofillManagerDelegate() {}
46 47
47 // Gets the PersonalDataManager instance associated with the delegate. 48 // Gets the PersonalDataManager instance associated with the delegate.
48 virtual PersonalDataManager* GetPersonalDataManager() = 0; 49 virtual PersonalDataManager* GetPersonalDataManager() = 0;
49 50
51 // Gets the AutofillWebDataService instance associated with the delegate.
52 virtual scoped_refptr<AutofillWebDataService> GetDatabase() = 0;
53
50 // Gets the preferences associated with the delegate. 54 // Gets the preferences associated with the delegate.
51 virtual PrefService* GetPrefs() = 0; 55 virtual PrefService* GetPrefs() = 0;
52 56
53 // Hides the associated request autocomplete dialog (if it exists). 57 // Hides the associated request autocomplete dialog (if it exists).
54 virtual void HideRequestAutocompleteDialog() = 0; 58 virtual void HideRequestAutocompleteDialog() = 0;
55 59
56 // Causes the Autofill settings UI to be shown. 60 // Causes the Autofill settings UI to be shown.
57 virtual void ShowAutofillSettings() = 0; 61 virtual void ShowAutofillSettings() = 0;
58 62
59 // Run |save_card_callback| if the credit card should be imported as personal 63 // Run |save_card_callback| if the credit card should be imported as personal
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 97
94 // Pass the form structures to the password generation manager to detect 98 // Pass the form structures to the password generation manager to detect
95 // account creation forms. 99 // account creation forms.
96 virtual void DetectAccountCreationForms( 100 virtual void DetectAccountCreationForms(
97 const std::vector<autofill::FormStructure*>& forms) = 0; 101 const std::vector<autofill::FormStructure*>& forms) = 0;
98 }; 102 };
99 103
100 } // namespace autofill 104 } // namespace autofill
101 105
102 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_ 106 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698