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

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

Issue 13928035: WIP Component build of autofill Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows compiling Created 7 years, 8 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 (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 COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_ 6 #define COMPONENTS_AUTOFILL_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/memory/ref_counted.h"
11 #include "base/string16.h" 12 #include "base/string16.h"
12 13
13 namespace content { 14 namespace content {
14 struct PasswordForm; 15 struct PasswordForm;
15 struct SSLStatus; 16 struct SSLStatus;
16 } 17 }
17 18
18 namespace gfx { 19 namespace gfx {
19 class Rect; 20 class Rect;
20 class RectF; 21 class RectF;
21 } 22 }
22 23
23 class GURL; 24 class GURL;
24 class InfoBarService; 25 class InfoBarService;
25 class PrefService; 26 class PrefService;
26 class ProfileSyncServiceBase; 27 class ProfileSyncServiceBase;
27 28
28 namespace autofill { 29 namespace autofill {
29 30
30 class AutofillMetrics; 31 class AutofillMetrics;
31 class AutofillPopupDelegate; 32 class AutofillPopupDelegate;
33 class AutofillWebDataService;
32 class CreditCard; 34 class CreditCard;
33 class FormStructure; 35 class FormStructure;
34 class PasswordGenerator; 36 class PasswordGenerator;
35 class PersonalDataManager; 37 class PersonalDataManager;
36 struct FormData; 38 struct FormData;
37 39
38 namespace autocheckout { 40 namespace autocheckout {
39 class WhitelistManager; 41 class WhitelistManager;
40 } 42 }
41 43
42 enum DialogType { 44 enum DialogType {
43 // Autofill dialog for the Autocheckout feature. 45 // Autofill dialog for the Autocheckout feature.
44 DIALOG_TYPE_AUTOCHECKOUT, 46 DIALOG_TYPE_AUTOCHECKOUT,
45 // Autofill dialog for the requestAutocomplete feature. 47 // Autofill dialog for the requestAutocomplete feature.
46 DIALOG_TYPE_REQUEST_AUTOCOMPLETE, 48 DIALOG_TYPE_REQUEST_AUTOCOMPLETE,
47 }; 49 };
48 50
49 // A delegate interface that needs to be supplied to AutofillManager 51 // A delegate interface that needs to be supplied to AutofillManager
50 // by the embedder. 52 // by the embedder.
51 // 53 //
52 // Each delegate instance is associated with a given context within 54 // Each delegate instance is associated with a given context within
53 // which an AutofillManager is used (e.g. a single tab), so when we 55 // which an AutofillManager is used (e.g. a single tab), so when we
54 // say "for the delegate" below, we mean "in the execution context the 56 // say "for the delegate" below, we mean "in the execution context the
55 // delegate is associated with" (e.g. for the tab the AutofillManager is 57 // delegate is associated with" (e.g. for the tab the AutofillManager is
56 // attached to). 58 // attached to).
57 class AutofillManagerDelegate { 59 class AutofillManagerDelegate {
58 public: 60 public:
59 virtual ~AutofillManagerDelegate() {} 61 virtual ~AutofillManagerDelegate() {}
60 62
63 // Gets the AutofillWebDataService instance associated with the delegate.
64 virtual scoped_refptr<AutofillWebDataService> GetAutofillWebDataService() = 0;
65
61 // Gets the PersonalDataManager instance associated with the delegate. 66 // Gets the PersonalDataManager instance associated with the delegate.
62 virtual PersonalDataManager* GetPersonalDataManager() = 0; 67 virtual PersonalDataManager* GetPersonalDataManager() = 0;
63 68
64 // Gets the preferences associated with the delegate. 69 // Gets the preferences associated with the delegate.
65 virtual PrefService* GetPrefs() = 0; 70 virtual PrefService* GetPrefs() = 0;
66 71
67 // Gets the autocheckout::WhitelistManager instance associated with the 72 // Gets the autocheckout::WhitelistManager instance associated with the
68 // delegate. 73 // delegate.
69 virtual autocheckout::WhitelistManager* 74 virtual autocheckout::WhitelistManager*
70 GetAutocheckoutWhitelistManager() const = 0; 75 GetAutocheckoutWhitelistManager() const = 0;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Hide the Autofill popup if one is currently showing. 143 // Hide the Autofill popup if one is currently showing.
139 virtual void HideAutofillPopup() = 0; 144 virtual void HideAutofillPopup() = 0;
140 145
141 // Updates the Autocheckout progress bar. |value| must be in [0.0, 1.0]. 146 // Updates the Autocheckout progress bar. |value| must be in [0.0, 1.0].
142 virtual void UpdateProgressBar(double value) = 0; 147 virtual void UpdateProgressBar(double value) = 0;
143 }; 148 };
144 149
145 } // namespace autofill 150 } // namespace autofill
146 151
147 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_ 152 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698