OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_AUTOFILL_API_AUTOFILL_MANAGER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_API_AUTOFILL_MANAGER_DELEGATE_H_ |
| 7 |
| 8 class InfoBarTabService; |
| 9 class PrefServiceBase; |
| 10 |
| 11 namespace autofill { |
| 12 |
| 13 // A delegate interface that needs to be supplied to AutofillManager |
| 14 // by the embedder. |
| 15 // |
| 16 // Each delegate instance is associated with a given context within |
| 17 // which an AutofillManager is used (e.g. a single tab), so when we |
| 18 // say "for the delegate" below, we mean "in the execution context the |
| 19 // delegate is associated with" (e.g. for the tab the AutofillManager is |
| 20 // attached to). |
| 21 class AutofillManagerDelegate { |
| 22 public: |
| 23 virtual ~AutofillManagerDelegate() {} |
| 24 |
| 25 // Gets the infobar service associated with the delegate. |
| 26 // |
| 27 // TODO(joi): Given the approach (which we will likely use more |
| 28 // widely) of a context associated with the instance of the delegate, |
| 29 // it seems right to rename InfoBarTabService to just |
| 30 // InfoBarService. Naming the getter appropriately, will name the |
| 31 // class itself in a follow-up change. |
| 32 virtual InfoBarTabService* GetInfoBarService() = 0; |
| 33 |
| 34 // Gets the preferences associated with the delegate. |
| 35 virtual PrefServiceBase* GetPrefs() = 0; |
| 36 |
| 37 // Returns true if saving passwords is currently enabled for the |
| 38 // delegate. |
| 39 virtual bool IsSavingPasswordsEnabled() const = 0; |
| 40 }; |
| 41 |
| 42 } // namespace autofill |
| 43 |
| 44 #endif // CHROME_BROWSER_AUTOFILL_API_AUTOFILL_MANAGER_DELEGATE_H_ |
OLD | NEW |