summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_manager_delegate.h
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-02 23:16:37 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-02 23:16:37 +0000
commitd4dedd812214aaa708049b07e2aae2b482445f25 (patch)
tree409ff53b766c0340c34b7454bf74543a2afe9497 /chrome/browser/autofill/autofill_manager_delegate.h
parent625a579564a60322d0a6e3af843c12514b1127d1 (diff)
downloadchromium_src-d4dedd812214aaa708049b07e2aae2b482445f25.zip
chromium_src-d4dedd812214aaa708049b07e2aae2b482445f25.tar.gz
chromium_src-d4dedd812214aaa708049b07e2aae2b482445f25.tar.bz2
Get rid of autofill/api directory. We're not building an API for each
component yet, and this vs. the chrome/browser/api directory was confusing several people. TBR=erikwright@chromium.org BUG=140037 Review URL: https://chromiumcodereview.appspot.com/10920054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_manager_delegate.h')
-rw-r--r--chrome/browser/autofill/autofill_manager_delegate.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_manager_delegate.h b/chrome/browser/autofill/autofill_manager_delegate.h
new file mode 100644
index 0000000..1bd95ba
--- /dev/null
+++ b/chrome/browser/autofill/autofill_manager_delegate.h
@@ -0,0 +1,62 @@
+// 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_AUTOFILL_MANAGER_DELEGATE_H_
+#define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_
+
+namespace autofill {
+class PasswordGenerator;
+}
+
+namespace gfx {
+class Rect;
+}
+
+namespace webkit {
+namespace forms {
+struct PasswordForm;
+}
+}
+
+class InfoBarService;
+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.
+ virtual InfoBarService* 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;
+
+ // Causes the Autofill settings UI to be shown.
+ virtual void ShowAutofillSettings() = 0;
+
+ // Causes the password generation bubble UI to be shown using the
+ // specified form with the given bounds.
+ virtual void ShowPasswordGenerationBubble(
+ const gfx::Rect& bounds,
+ const webkit::forms::PasswordForm& form,
+ autofill::PasswordGenerator* generator) = 0;
+};
+
+} // namespace autofill
+
+#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_