Chromium Code Reviews| 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 768d7f6ea89f2d80b0a1acc7e400fc8ff2137137..41a3345bf634b640fc31d435fff54dbe7a7ce5af 100644 |
| --- a/components/autofill/content/renderer/autofill_agent.h |
| +++ b/components/autofill/content/renderer/autofill_agent.h |
| @@ -38,7 +38,7 @@ class PasswordGenerationAgent; |
| // This code was originally part of RenderView. |
| // Note that Autofill encompasses: |
| // - single text field suggestions, that we usually refer to as Autocomplete, |
| -// - password form fill, refered to as Password Autofill, and |
| +// - password form fill, referred to as Password Autofill, and |
| // - entire form fill based on one field entry, referred to as Form Autofill. |
| class AutofillAgent : public content::RenderViewObserver, |
| @@ -65,8 +65,10 @@ class AutofillAgent : public content::RenderViewObserver, |
| const blink::WebFormElement& form) override; |
| void DidChangeScrollOffset(blink::WebLocalFrame* frame) override; |
| void FocusedNodeChanged(const blink::WebNode& node) override; |
| + void WillAnimatePageScale(bool will_animate) override; |
|
aelias_OOO_until_Jul13
2014/11/22 03:38:11
FocusChangeComplete(bool will_animate) would be a
|
| void OrientationChangeEvent() override; |
| void Resized() override; |
| + void DidCompletePageScaleAnimation() override; |
| // PageClickListener: |
| void FormControlElementClicked(const blink::WebFormControlElement& element, |
| @@ -94,6 +96,17 @@ class AutofillAgent : public content::RenderViewObserver, |
| void OnPing(); |
| void OnPreviewForm(int query_id, const FormData& form); |
| + // Called when page scale animation is completed or cancelled. |
| + void OnAnimationCompleted(); |
| + |
| + // Called when page scale animation is completed after |element| was clicked. |
| + void OnAnimationCompletedAfterFormControlElementClicked( |
| + const blink::WebFormControlElement& element, |
| + bool was_focused); |
| + |
| + // Called when page scale animation is completed after |node| was focused. |
| + void OnAnimationCompletedAfterFocusedNodeChanged(const blink::WebNode& node); |
| + |
| // For external Autofill selection. |
| void OnClearForm(); |
| void OnClearPreviewedForm(); |
| @@ -222,9 +235,20 @@ class AutofillAgent : public content::RenderViewObserver, |
| // True if a message has already been sent about forms for the main frame. |
| // When the main frame is first loaded, a message is sent even if no forms |
| - // exist in the frame. Otherwise, such messages are supressed. |
| + // exist in the frame. Otherwise, such messages are suppressed. |
| bool main_frame_processed_; |
| + // The form control element for which the click event handler has been |
| + // suppressed until page scale animation is complete. |
| + blink::WebFormControlElement clicked_form_control_element_; |
| + |
| + // Whether |clicked_form_control_element_| was focused when it was clicked. |
| + bool clicked_form_control_element_was_focused_; |
| + |
| + // The node for which the focus changed event handler has been suppressed |
| + // until page scale animation is complete. |
| + blink::WebNode changed_focused_node_; |
| + |
| base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |