Chromium Code Reviews| Index: chrome/browser/autofill/api/autofill_client.h |
| diff --git a/chrome/browser/autofill/api/autofill_client.h b/chrome/browser/autofill/api/autofill_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2a297019e4d5096cb994e9e96a78d052afb89205 |
| --- /dev/null |
| +++ b/chrome/browser/autofill/api/autofill_client.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_AUTOFILL_API_AUTOFILL_CLIENT_H_ |
| +#define CHROME_BROWSER_AUTOFILL_API_AUTOFILL_CLIENT_H_ |
| + |
| +class InfoBarTabService; |
| +class PrefServiceBase; |
| + |
| +namespace autofill { |
| + |
| +// A delegate interface that needs to be supplied to AutofillManager |
| +// by the embedder. |
| +// |
| +// Each client instance is associated with a given context within |
| +// which an AutofillManager is used (e.g. a single tab), so when we |
| +// say "for the client" below, we mean "in the execution context the |
| +// client is associated with" (e.g. for the tab the AutofillManager is |
| +// attached to). |
| +class AutofillClient { |
|
Ilya Sherman
2012/08/22 03:38:03
Hmm, this seems like it is more of a host than a c
|
| + public: |
| + virtual ~AutofillClient() {} |
| + |
| + // Gets the infobar service associated with the client. |
| + // |
| + // TODO(joi): Given the approach (which we will likely use more |
| + // widely) of a context associated with the instance of the client, |
| + // it seems right to rename InfoBarTabService to just |
| + // InfoBarService. Naming the getter appropriately, will name the |
| + // class itself in a follow-up change. |
| + virtual InfoBarTabService* GetInfoBarService() = 0; |
| + |
| + // Gets the preferences associated with the client. |
| + virtual PrefServiceBase* GetPrefs() = 0; |
| + |
| + // Returns true if saving passwords is currently enabled for the |
| + // client. |
| + virtual bool IsSavingPasswordsEnabled() = 0; |
| +}; |
| + |
| +} // namespace autofill |
| + |
| +#endif // CHROME_BROWSER_AUTOFILL_API_AUTOFILL_CLIENT_H_ |