Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / autofill / autofill_dialog_controller.h
blob0fbcabe455008723d1bdd22affd377fe473f78a7
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/strings/string16.h"
13 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
14 #include "components/autofill/core/browser/form_structure.h"
16 class GURL;
17 class PrefRegistrySimple;
19 namespace content {
20 class WebContents;
23 namespace user_prefs {
24 class PrefRegistrySyncable;
27 namespace autofill {
29 // This class defines the interface to the controller for TabAutofillManager.
30 class AutofillDialogController {
31 public:
32 virtual ~AutofillDialogController();
34 // Creates the AutofillDialogController.
35 static base::WeakPtr<AutofillDialogController> Create(
36 content::WebContents* contents,
37 const FormData& form_structure,
38 const GURL& source_url,
39 const base::Callback<void(const FormStructure*)>& callback);
41 // Registers device preferences.
42 static void RegisterPrefs(PrefRegistrySimple* registry);
44 // Registers profile preferences.
45 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
47 // Shows the Autofill dialog.
48 virtual void Show() = 0;
50 // Hides the Autofill dialog.
51 virtual void Hide() = 0;
53 // Called when the tab hosting this dialog is activated by a user gesture.
54 // Used to trigger a refresh of the user's Wallet data.
55 virtual void TabActivated() = 0;
58 } // namespace autofill
60 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_