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

Unified Diff: components/autofill/content/renderer/autofill_agent.h

Issue 715733002: [Android] Show autofill popup after animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698