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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller.h

Issue 22623002: Extract AutofillDialogController interface and common utilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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
Index: chrome/browser/ui/autofill/autofill_dialog_controller.h
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller.h b/chrome/browser/ui/autofill/autofill_dialog_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..8255553e9fe7b42267ab2078d5bfbc7cacb78336
--- /dev/null
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller.h
@@ -0,0 +1,76 @@
+// 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_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
+#define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/memory/weak_ptr.h"
+#include "base/strings/string16.h"
+#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
+#include "components/autofill/content/browser/autocheckout_steps.h"
+#include "components/autofill/core/browser/form_structure.h"
+
+class GURL;
+
+namespace content {
+class WebContents;
+}
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
+namespace autofill {
+
+// This class defines the interface to the controller for TabAutofillManager.
+class AutofillDialogController {
+ public:
+ virtual ~AutofillDialogController();
+
+ // Creates the AutofillDialogController.
+ static base::WeakPtr<AutofillDialogController> Create(
+ content::WebContents* contents,
+ const FormData& form_structure,
+ const GURL& source_url,
+ const DialogType dialog_type,
+ const base::Callback<void(const FormStructure*,
+ const std::string&)>& callback);
+
+ // Registers profile preferences.
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
+ // Shows the Autofill dialog.
+ virtual void Show() = 0;
+
+ // Hides the Autofill dialog.
+ virtual void Hide() = 0;
+
+ // Called when the tab hosting this dialog is activated by a user gesture.
+ // Used to trigger a refresh of the user's Wallet data.
+ virtual void TabActivated() = 0;
+
+ // Adds a step in the flow to the Autocheckout UI.
+ virtual void AddAutocheckoutStep(AutocheckoutStepType step_type) = 0;
+
+ // Updates the status of a step in the Autocheckout UI.
+ virtual void UpdateAutocheckoutStep(
+ AutocheckoutStepType step_type,
+ AutocheckoutStepStatus step_status) = 0;
+
+ // Called when there is an error in an active Autocheckout flow.
+ virtual void OnAutocheckoutError() = 0;
+
+ // Called when an Autocheckout flow completes successfully.
+ virtual void OnAutocheckoutSuccess() = 0;
+
+ // Returns the dialog type.
+ virtual DialogType GetDialogType() const = 0;
+};
+
+} // namespace autofill
+
+#endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_common.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698