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

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

Issue 796493004: Remove FrameDetached and FrameWillClose listeners from AutofillAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test and fix code Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CHROME_AUTOFILL_CLIENT_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_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"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // AutofillClient: 47 // AutofillClient:
48 PersonalDataManager* GetPersonalDataManager() override; 48 PersonalDataManager* GetPersonalDataManager() override;
49 scoped_refptr<AutofillWebDataService> GetDatabase() override; 49 scoped_refptr<AutofillWebDataService> GetDatabase() override;
50 PrefService* GetPrefs() override; 50 PrefService* GetPrefs() override;
51 void HideRequestAutocompleteDialog() override; 51 void HideRequestAutocompleteDialog() override;
52 void ShowAutofillSettings() override; 52 void ShowAutofillSettings() override;
53 void ShowUnmaskPrompt() override; 53 void ShowUnmaskPrompt() override;
54 void ConfirmSaveCreditCard(const base::Closure& save_card_callback) override; 54 void ConfirmSaveCreditCard(const base::Closure& save_card_callback) override;
55 bool HasCreditCardScanFeature() override; 55 bool HasCreditCardScanFeature() override;
56 void ScanCreditCard(const CreditCardScanCallback& callback) override; 56 void ScanCreditCard(const CreditCardScanCallback& callback) override;
57 void ShowRequestAutocompleteDialog(const FormData& form, 57 void ShowRequestAutocompleteDialog(
58 const GURL& source_url, 58 const FormData& form,
59 const ResultCallback& callback) override; 59 content::RenderFrameHost* render_frame_host,
60 const ResultCallback& callback) override;
60 void ShowAutofillPopup( 61 void ShowAutofillPopup(
61 const gfx::RectF& element_bounds, 62 const gfx::RectF& element_bounds,
62 base::i18n::TextDirection text_direction, 63 base::i18n::TextDirection text_direction,
63 const std::vector<autofill::Suggestion>& suggestions, 64 const std::vector<autofill::Suggestion>& suggestions,
64 base::WeakPtr<AutofillPopupDelegate> delegate) override; 65 base::WeakPtr<AutofillPopupDelegate> delegate) override;
65 void UpdateAutofillPopupDataListValues( 66 void UpdateAutofillPopupDataListValues(
66 const std::vector<base::string16>& values, 67 const std::vector<base::string16>& values,
67 const std::vector<base::string16>& labels) override; 68 const std::vector<base::string16>& labels) override;
68 void HideAutofillPopup() override; 69 void HideAutofillPopup() override;
69 bool IsAutocompleteEnabled() override; 70 bool IsAutocompleteEnabled() override;
70 void DetectAccountCreationForms( 71 void DetectAccountCreationForms(
71 content::RenderFrameHost* rfh, 72 content::RenderFrameHost* rfh,
72 const std::vector<autofill::FormStructure*>& forms) override; 73 const std::vector<autofill::FormStructure*>& forms) override;
73 void DidFillOrPreviewField(const base::string16& autofilled_value, 74 void DidFillOrPreviewField(const base::string16& autofilled_value,
74 const base::string16& profile_full_name) override; 75 const base::string16& profile_full_name) override;
75 void OnFirstUserGestureObserved() override; 76 void OnFirstUserGestureObserved() override;
76 77
77 // content::WebContentsObserver implementation. 78 // content::WebContentsObserver implementation.
79 void RenderFrameDeleted(content::RenderFrameHost* rfh) override;
80 void DidNavigateAnyFrame(
81 content::RenderFrameHost* render_frame_host,
82 const content::LoadCommittedDetails& details,
83 const content::FrameNavigateParams& params) override;
78 void WebContentsDestroyed() override; 84 void WebContentsDestroyed() override;
79 85
80 // ZoomObserver implementation. 86 // ZoomObserver implementation.
81 void OnZoomChanged( 87 void OnZoomChanged(
82 const ui_zoom::ZoomController::ZoomChangedEventData& data) override; 88 const ui_zoom::ZoomController::ZoomChangedEventData& data) override;
83 89
84 // Exposed for testing. 90 // Exposed for testing.
85 AutofillDialogController* GetDialogControllerForTesting() { 91 AutofillDialogController* GetDialogControllerForTesting() {
86 return dialog_controller_.get(); 92 return dialog_controller_.get();
87 } 93 }
(...skipping 30 matching lines...) Expand all
118 // Listens to Keystone notifications and passes relevant ones on to the 124 // Listens to Keystone notifications and passes relevant ones on to the
119 // PersonalDataManager. 125 // PersonalDataManager.
120 // 126 //
121 // The class of this member must remain a forward declaration, even in the 127 // The class of this member must remain a forward declaration, even in the
122 // .cc implementation file, since the class is defined in a Mac-only 128 // .cc implementation file, since the class is defined in a Mac-only
123 // implementation file. This means that the pointer cannot be wrapped in a 129 // implementation file. This means that the pointer cannot be wrapped in a
124 // scoped_ptr. 130 // scoped_ptr.
125 AutofillKeystoneBridgeWrapper* bridge_wrapper_; 131 AutofillKeystoneBridgeWrapper* bridge_wrapper_;
126 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 132 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
127 133
134 // The last render frame that called requestAutocomplete.
135 content::RenderFrameHost* last_rfh_to_rac_;
136
128 CardUnmaskPromptView* card_unmask_view_; 137 CardUnmaskPromptView* card_unmask_view_;
129 138
130 base::WeakPtrFactory<ChromeAutofillClient> weak_pointer_factory_; 139 base::WeakPtrFactory<ChromeAutofillClient> weak_pointer_factory_;
131 140
132 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); 141 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient);
133 }; 142 };
134 143
135 } // namespace autofill 144 } // namespace autofill
136 145
137 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ 146 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698