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

Unified Diff: chrome/browser/autofill/api/autofill_manager_delegate.h

Issue 10837363: Introduce AutofillClient and use it to get rid of PasswordManager dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix header Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/DEPS ('k') | chrome/browser/autofill/autofill_external_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/api/autofill_manager_delegate.h
diff --git a/chrome/browser/autofill/api/autofill_manager_delegate.h b/chrome/browser/autofill/api/autofill_manager_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..3f478a1be042ce1a77bac4a0b5655f45e95bf5d1
--- /dev/null
+++ b/chrome/browser/autofill/api/autofill_manager_delegate.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_MANAGER_DELEGATE_H_
+#define CHROME_BROWSER_AUTOFILL_API_AUTOFILL_MANAGER_DELEGATE_H_
+
+class InfoBarTabService;
+class PrefServiceBase;
+
+namespace autofill {
+
+// A delegate interface that needs to be supplied to AutofillManager
+// by the embedder.
+//
+// Each delegate instance is associated with a given context within
+// which an AutofillManager is used (e.g. a single tab), so when we
+// say "for the delegate" below, we mean "in the execution context the
+// delegate is associated with" (e.g. for the tab the AutofillManager is
+// attached to).
+class AutofillManagerDelegate {
+ public:
+ virtual ~AutofillManagerDelegate() {}
+
+ // Gets the infobar service associated with the delegate.
+ //
+ // TODO(joi): Given the approach (which we will likely use more
+ // widely) of a context associated with the instance of the delegate,
+ // 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 delegate.
+ virtual PrefServiceBase* GetPrefs() = 0;
+
+ // Returns true if saving passwords is currently enabled for the
+ // delegate.
+ virtual bool IsSavingPasswordsEnabled() const = 0;
+};
+
+} // namespace autofill
+
+#endif // CHROME_BROWSER_AUTOFILL_API_AUTOFILL_MANAGER_DELEGATE_H_
« no previous file with comments | « chrome/browser/autofill/DEPS ('k') | chrome/browser/autofill/autofill_external_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698