Index: components/autofill/content/renderer/autofill_agent.h |
diff --git a/components/autofill/content/renderer/autofill_agent.h b/components/autofill/content/renderer/autofill_agent.h |
index d062c32ca3081bb82b0e5a95a19738dca913a3e2..37f50fc0c5ea496e1f469d78dc9fd1c102d8b2ec 100644 |
--- a/components/autofill/content/renderer/autofill_agent.h |
+++ b/components/autofill/content/renderer/autofill_agent.h |
@@ -55,6 +55,33 @@ class AutofillAgent : public content::RenderViewObserver, |
PasswordGenerationAgent* password_generation_agent); |
virtual ~AutofillAgent(); |
+ protected: |
+ // PageClickListener: |
+ virtual void FormControlElementClicked( |
+ const blink::WebFormControlElement& element, |
+ bool was_focused) OVERRIDE; |
+ |
+ // blink::WebAutofillClient: |
+ virtual void textFieldDidEndEditing( |
+ const blink::WebInputElement& element) OVERRIDE; |
+ virtual void textFieldDidChange( |
+ const blink::WebFormControlElement& element) OVERRIDE; |
+ virtual void textFieldDidReceiveKeyDown( |
+ const blink::WebInputElement& element, |
+ const blink::WebKeyboardEvent& event) OVERRIDE; |
+ virtual void didRequestAutocomplete( |
+ const blink::WebFormElement& form) OVERRIDE; |
+ |
+ virtual void OnFillPasswordSuggestion(const base::string16& username, |
+ const base::string16& password); |
Ilya Sherman
2014/09/18 18:45:53
Please modify the test to simulate sending an IPC
Pritam Nikam
2014/09/19 11:08:03
Done.
|
+ |
+ // Called when interactive autocomplete finishes. |message| is printed to |
+ // the console if non-empty. |
+ virtual void OnRequestAutocompleteResult( |
+ blink::WebFormElement::AutocompleteResult result, |
+ const base::string16& message, |
+ const FormData& form_data); |
Ilya Sherman
2014/09/18 18:45:52
Ditto.
Pritam Nikam
2014/09/19 11:08:03
Done.
|
+ |
private: |
// content::RenderViewObserver: |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
@@ -70,21 +97,7 @@ class AutofillAgent : public content::RenderViewObserver, |
virtual void OrientationChangeEvent() OVERRIDE; |
virtual void Resized() OVERRIDE; |
- // PageClickListener: |
- virtual void FormControlElementClicked( |
- const blink::WebFormControlElement& element, |
- bool was_focused) OVERRIDE; |
- |
// blink::WebAutofillClient: |
Ilya Sherman
2014/09/18 18:45:52
If you move some of the methods in this group to h
Pritam Nikam
2014/09/19 11:08:03
Done.
|
- virtual void textFieldDidEndEditing( |
- const blink::WebInputElement& element); |
- virtual void textFieldDidChange( |
- const blink::WebFormControlElement& element); |
- virtual void textFieldDidReceiveKeyDown( |
- const blink::WebInputElement& element, |
- const blink::WebKeyboardEvent& event); |
- virtual void didRequestAutocomplete( |
- const blink::WebFormElement& form); |
virtual void setIgnoreTextChanges(bool ignore); |
virtual void didAssociateFormControls( |
const blink::WebVector<blink::WebNode>& nodes); |
@@ -103,18 +116,9 @@ class AutofillAgent : public content::RenderViewObserver, |
void OnFillFieldWithValue(const base::string16& value); |
void OnPreviewFieldWithValue(const base::string16& value); |
void OnAcceptDataListSuggestion(const base::string16& value); |
- void OnFillPasswordSuggestion(const base::string16& username, |
- const base::string16& password); |
void OnPreviewPasswordSuggestion(const base::string16& username, |
const base::string16& password); |
- // Called when interactive autocomplete finishes. |message| is printed to |
- // the console if non-empty. |
- void OnRequestAutocompleteResult( |
- blink::WebFormElement::AutocompleteResult result, |
- const base::string16& message, |
- const FormData& form_data); |
- |
// Called when an autocomplete request succeeds or fails with the |result|. |
void FinishAutocompleteRequest( |
blink::WebFormElement::AutocompleteResult result); |
@@ -230,25 +234,6 @@ class AutofillAgent : public content::RenderViewObserver, |
base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
- friend class PasswordAutofillAgentTest; |
- friend class RequestAutocompleteRendererTest; |
- FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, FillFormElement); |
- FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, SendDynamicForms); |
- FRIEND_TEST_ALL_PREFIXES(AutofillRendererTest, ShowAutofillWarning); |
- FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername); |
- FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept); |
- FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect); |
- FRIEND_TEST_ALL_PREFIXES( |
- PasswordAutofillAgentTest, |
- PasswordAutofillTriggersOnChangeEventsWaitForUsername); |
- FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, CredentialsOnClick); |
- FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest, |
- NoCancelOnMainFrameNavigateAfterDone); |
- FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest, |
- NoCancelOnSubframeNavigateAfterDone); |
- FRIEND_TEST_ALL_PREFIXES(RequestAutocompleteRendererTest, |
- InvokingTwiceOnlyShowsOnce); |
- |
DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
}; |