| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/autofill/autofill_manager_delegate.h" | 11 #include "chrome/browser/autofill/autofill_manager_delegate.h" |
| 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 12 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| 12 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
| 13 #include "content/public/browser/web_contents_user_data.h" | 14 #include "content/public/browser/web_contents_user_data.h" |
| 14 | 15 |
| 15 class AutofillPopupControllerImpl; | 16 class AutofillPopupControllerImpl; |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 struct FrameNavigateParams; | 19 struct FrameNavigateParams; |
| 19 struct LoadCommittedDetails; | 20 struct LoadCommittedDetails; |
| 20 class WebContents; | 21 class WebContents; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace autofill { | 24 namespace autofill { |
| 24 | 25 |
| 25 class AutofillDialogControllerImpl; | 26 class AutofillDialogControllerImpl; |
| 26 | 27 |
| 27 // Chrome implementation of AutofillManagerDelegate. | 28 // Chrome implementation of AutofillManagerDelegate. |
| 28 class TabAutofillManagerDelegate | 29 class TabAutofillManagerDelegate |
| 29 : public AutofillManagerDelegate, | 30 : public AutofillManagerDelegate, |
| 30 public content::WebContentsUserData<TabAutofillManagerDelegate>, | 31 public content::WebContentsUserData<TabAutofillManagerDelegate>, |
| 31 public content::WebContentsObserver { | 32 public content::WebContentsObserver { |
| 32 public: | 33 public: |
| 33 virtual ~TabAutofillManagerDelegate(); | 34 virtual ~TabAutofillManagerDelegate(); |
| 34 | 35 |
| 35 // AutofillManagerDelegate implementation. | 36 // AutofillManagerDelegate implementation. |
| 36 virtual InfoBarService* GetInfoBarService() OVERRIDE; | |
| 37 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE; | 37 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE; |
| 38 virtual PrefService* GetPrefs() OVERRIDE; | 38 virtual PrefService* GetPrefs() OVERRIDE; |
| 39 virtual ProfileSyncServiceBase* GetProfileSyncService() OVERRIDE; | 39 virtual ProfileSyncServiceBase* GetProfileSyncService() OVERRIDE; |
| 40 virtual void HideRequestAutocompleteDialog() OVERRIDE; | 40 virtual void HideRequestAutocompleteDialog() OVERRIDE; |
| 41 virtual bool IsSavingPasswordsEnabled() const OVERRIDE; | 41 virtual bool IsSavingPasswordsEnabled() const OVERRIDE; |
| 42 virtual void OnAutocheckoutError() OVERRIDE; | 42 virtual void OnAutocheckoutError() OVERRIDE; |
| 43 virtual void ShowAutofillSettings() OVERRIDE; | 43 virtual void ShowAutofillSettings() OVERRIDE; |
| 44 virtual void ShowAutofillCCImportConfirmation( |
| 45 scoped_ptr<AutofillCCImportConfirmationDelegate> delegate) OVERRIDE; |
| 44 virtual void ShowPasswordGenerationBubble( | 46 virtual void ShowPasswordGenerationBubble( |
| 45 const gfx::Rect& bounds, | 47 const gfx::Rect& bounds, |
| 46 const content::PasswordForm& form, | 48 const content::PasswordForm& form, |
| 47 PasswordGenerator* generator) OVERRIDE; | 49 PasswordGenerator* generator) OVERRIDE; |
| 48 virtual void ShowAutocheckoutBubble( | 50 virtual void ShowAutocheckoutBubble( |
| 49 const gfx::RectF& bounds, | 51 const gfx::RectF& bounds, |
| 50 const gfx::NativeView& native_view, | 52 const gfx::NativeView& native_view, |
| 51 const base::Closure& callback) OVERRIDE; | 53 const base::Closure& callback) OVERRIDE; |
| 52 virtual void ShowRequestAutocompleteDialog( | 54 virtual void ShowRequestAutocompleteDialog( |
| 53 const FormData& form, | 55 const FormData& form, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 78 content::WebContents* const web_contents_; | 80 content::WebContents* const web_contents_; |
| 79 AutofillDialogControllerImpl* dialog_controller_; // weak. | 81 AutofillDialogControllerImpl* dialog_controller_; // weak. |
| 80 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 82 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
| 81 | 83 |
| 82 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); | 84 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace autofill | 87 } // namespace autofill |
| 86 | 88 |
| 87 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 89 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
| OLD | NEW |