| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // This class defines the interface to the controller for TabAutofillManager. | 28 // This class defines the interface to the controller for TabAutofillManager. |
| 29 class AutofillDialogController { | 29 class AutofillDialogController { |
| 30 public: | 30 public: |
| 31 virtual ~AutofillDialogController(); | 31 virtual ~AutofillDialogController(); |
| 32 | 32 |
| 33 // Creates the AutofillDialogController. | 33 // Creates the AutofillDialogController. |
| 34 static base::WeakPtr<AutofillDialogController> Create( | 34 static base::WeakPtr<AutofillDialogController> Create( |
| 35 content::WebContents* contents, | 35 content::WebContents* contents, |
| 36 const FormData& form_structure, | 36 const FormData& form_structure, |
| 37 const GURL& source_url, | 37 const GURL& source_url, |
| 38 const DialogType dialog_type, | |
| 39 const base::Callback<void(const FormStructure*, | 38 const base::Callback<void(const FormStructure*, |
| 40 const std::string&)>& callback); | 39 const std::string&)>& callback); |
| 41 | 40 |
| 42 // Registers profile preferences. | 41 // Registers profile preferences. |
| 43 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 42 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 44 | 43 |
| 45 // Shows the Autofill dialog. | 44 // Shows the Autofill dialog. |
| 46 virtual void Show() = 0; | 45 virtual void Show() = 0; |
| 47 | 46 |
| 48 // Hides the Autofill dialog. | 47 // Hides the Autofill dialog. |
| 49 virtual void Hide() = 0; | 48 virtual void Hide() = 0; |
| 50 | 49 |
| 51 // Called when the tab hosting this dialog is activated by a user gesture. | 50 // Called when the tab hosting this dialog is activated by a user gesture. |
| 52 // Used to trigger a refresh of the user's Wallet data. | 51 // Used to trigger a refresh of the user's Wallet data. |
| 53 virtual void TabActivated() = 0; | 52 virtual void TabActivated() = 0; |
| 54 | |
| 55 // TODO(ramankk): Get rid of DialogType as there is only one DialogType now. | |
| 56 // Returns the dialog type. | |
| 57 virtual DialogType GetDialogType() const = 0; | |
| 58 }; | 53 }; |
| 59 | 54 |
| 60 } // namespace autofill | 55 } // namespace autofill |
| 61 | 56 |
| 62 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ | 57 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ |
| OLD | NEW |