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

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

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 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/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager_delegate.h
diff --git a/chrome/browser/autofill/autofill_manager_delegate.h b/chrome/browser/autofill/autofill_manager_delegate.h
deleted file mode 100644
index 4d8878b38bb322e689af76781c0768e52d82c322..0000000000000000000000000000000000000000
--- a/chrome/browser/autofill/autofill_manager_delegate.h
+++ /dev/null
@@ -1,145 +0,0 @@
-// 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_
-
-#include <vector>
-
-#include "base/callback_forward.h"
-#include "base/string16.h"
-#include "ui/gfx/native_widget_types.h"
-
-namespace autofill {
-class PasswordGenerator;
-}
-
-namespace content {
-struct PasswordForm;
-struct SSLStatus;
-}
-
-namespace gfx {
-class Rect;
-class RectF;
-}
-
-class AutofillMetrics;
-class AutofillPopupDelegate;
-class CreditCard;
-class FormStructure;
-class GURL;
-class InfoBarService;
-class PersonalDataManager;
-class PrefService;
-class ProfileSyncServiceBase;
-
-struct FormData;
-
-namespace autofill {
-
-enum DialogType {
- // Autofill dialog for the Autocheckout feature.
- DIALOG_TYPE_AUTOCHECKOUT,
- // Autofill dialog for the requestAutocomplete feature.
- DIALOG_TYPE_REQUEST_AUTOCOMPLETE,
-};
-
-// 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 PersonalDataManager instance associated with the delegate.
- virtual PersonalDataManager* GetPersonalDataManager() = 0;
-
- // Gets the preferences associated with the delegate.
- virtual PrefService* GetPrefs() = 0;
-
- // Hides the associated request autocomplete dialog (if it exists).
- virtual void HideRequestAutocompleteDialog() = 0;
-
- // Returns true if saving passwords is currently enabled for the
- // delegate.
- virtual bool IsSavingPasswordsEnabled() const = 0;
-
- // Returns true if Sync is enabled for the passwords datatype.
- virtual bool IsPasswordSyncEnabled() const = 0;
-
- // Sets a callback that will be called when sync state changes.
- //
- // Set the callback to an object for which |is_null()| evaluates to
- // true to stop receiving notifications
- // (e.g. SetSyncStateChangedCallback(base::Closure())).
- virtual void SetSyncStateChangedCallback(const base::Closure& callback) = 0;
-
- // Causes an error explaining that Autocheckout has failed to be displayed to
- // the user.
- virtual void OnAutocheckoutError() = 0;
-
- // Causes the Autofill settings UI to be shown.
- virtual void ShowAutofillSettings() = 0;
-
- // Run |save_card_callback| if the credit card should be imported as personal
- // data. |metric_logger| can be used to log user actions.
- virtual void ConfirmSaveCreditCard(
- const AutofillMetrics& metric_logger,
- const CreditCard& credit_card,
- const base::Closure& save_card_callback) = 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 content::PasswordForm& form,
- autofill::PasswordGenerator* generator) = 0;
-
- // Causes the Autocheckout bubble UI to be displayed. |bounding_box| is the
- // anchor for the bubble. |native_view| is the parent view of the bubble.
- // |callback| is run if the bubble is accepted.
- virtual void ShowAutocheckoutBubble(
- const gfx::RectF& bounding_box,
- const gfx::NativeView& native_view,
- const base::Closure& callback) = 0;
-
- // Causes the dialog for request autocomplete feature to be shown.
- virtual void ShowRequestAutocompleteDialog(
- const FormData& form,
- const GURL& source_url,
- const content::SSLStatus& ssl_status,
- const AutofillMetrics& metric_logger,
- DialogType dialog_type,
- const base::Callback<void(const FormStructure*)>& callback) = 0;
-
- // Called when the dialog for request autocomplete closes. (So UI code will
- // free memory, etc.)
- virtual void RequestAutocompleteDialogClosed() = 0;
-
- // Shows an Autofill popup with the given |values|, |labels|, |icons|, and
- // |identifiers| for the element at |element_bounds|. |delegate| will be
- // notified of popup events.
- virtual void ShowAutofillPopup(const gfx::RectF& element_bounds,
- const std::vector<string16>& values,
- const std::vector<string16>& labels,
- const std::vector<string16>& icons,
- const std::vector<int>& identifiers,
- AutofillPopupDelegate* delegate) = 0;
-
- // Hide the Autofill popup if one is currently showing.
- virtual void HideAutofillPopup() = 0;
-
- // Updates the Autocheckout progress bar. |value| must be in [0.0, 1.0].
- virtual void UpdateProgressBar(double value) = 0;
-};
-
-} // namespace autofill
-
-#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_DELEGATE_H_
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698