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

Side by Side Diff: chrome/browser/ui/autofill/chrome_autofill_client.h

Issue 306053008: Rename AutofillManagerDelegate to AutofillClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_CHROME_AUTOFILL_CLIENT_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "components/autofill/core/browser/autofill_manager_delegate.h" 12 #include "components/autofill/core/browser/autofill_client.h"
13 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
14 #include "content/public/browser/web_contents_user_data.h" 14 #include "content/public/browser/web_contents_user_data.h"
15 15
16 namespace content { 16 namespace content {
17 struct FrameNavigateParams; 17 struct FrameNavigateParams;
18 struct LoadCommittedDetails; 18 struct LoadCommittedDetails;
19 class WebContents; 19 class WebContents;
20 } 20 }
21 21
22 namespace autofill { 22 namespace autofill {
23 23
24 class AutofillDialogController; 24 class AutofillDialogController;
25 class AutofillPopupControllerImpl; 25 class AutofillPopupControllerImpl;
26 struct FormData; 26 struct FormData;
27 27
28 // Chrome implementation of AutofillManagerDelegate. 28 // Chrome implementation of AutofillClient.
29 class TabAutofillManagerDelegate 29 class ChromeAutofillClient
30 : public AutofillManagerDelegate, 30 : public AutofillClient,
31 public content::WebContentsUserData<TabAutofillManagerDelegate>, 31 public content::WebContentsUserData<ChromeAutofillClient>,
32 public content::WebContentsObserver { 32 public content::WebContentsObserver {
33 public: 33 public:
34 virtual ~TabAutofillManagerDelegate(); 34 virtual ~ChromeAutofillClient();
35 35
36 // Called when the tab corresponding to |this| instance is activated. 36 // Called when the tab corresponding to |this| instance is activated.
37 void TabActivated(); 37 void TabActivated();
38 38
39 // AutofillManagerDelegate implementation. 39 // AutofillClient:
40 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE; 40 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE;
41 virtual scoped_refptr<AutofillWebDataService> 41 virtual scoped_refptr<AutofillWebDataService> GetDatabase() OVERRIDE;
42 GetDatabase() OVERRIDE;
43 virtual PrefService* GetPrefs() OVERRIDE; 42 virtual PrefService* GetPrefs() OVERRIDE;
44 virtual void HideRequestAutocompleteDialog() OVERRIDE; 43 virtual void HideRequestAutocompleteDialog() OVERRIDE;
45 virtual void ShowAutofillSettings() OVERRIDE; 44 virtual void ShowAutofillSettings() OVERRIDE;
46 virtual void ConfirmSaveCreditCard( 45 virtual void ConfirmSaveCreditCard(
47 const AutofillMetrics& metric_logger, 46 const AutofillMetrics& metric_logger,
48 const base::Closure& save_card_callback) OVERRIDE; 47 const base::Closure& save_card_callback) OVERRIDE;
49 virtual void ShowRequestAutocompleteDialog( 48 virtual void ShowRequestAutocompleteDialog(
50 const FormData& form, 49 const FormData& form,
51 const GURL& source_url, 50 const GURL& source_url,
52 const ResultCallback& callback) OVERRIDE; 51 const ResultCallback& callback) OVERRIDE;
(...skipping 22 matching lines...) Expand all
75 // Exposed for testing. 74 // Exposed for testing.
76 AutofillDialogController* GetDialogControllerForTesting() { 75 AutofillDialogController* GetDialogControllerForTesting() {
77 return dialog_controller_.get(); 76 return dialog_controller_.get();
78 } 77 }
79 void SetDialogControllerForTesting( 78 void SetDialogControllerForTesting(
80 const base::WeakPtr<AutofillDialogController>& dialog_controller) { 79 const base::WeakPtr<AutofillDialogController>& dialog_controller) {
81 dialog_controller_ = dialog_controller; 80 dialog_controller_ = dialog_controller;
82 } 81 }
83 82
84 private: 83 private:
85 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); 84 explicit ChromeAutofillClient(content::WebContents* web_contents);
86 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; 85 friend class content::WebContentsUserData<ChromeAutofillClient>;
87 86
88 content::WebContents* const web_contents_; 87 content::WebContents* const web_contents_;
89 base::WeakPtr<AutofillDialogController> dialog_controller_; 88 base::WeakPtr<AutofillDialogController> dialog_controller_;
90 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; 89 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_;
91 90
92 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); 91 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient);
93 }; 92 };
94 93
95 } // namespace autofill 94 } // namespace autofill
96 95
97 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ 96 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | chrome/browser/ui/autofill/chrome_autofill_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698