OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 PageClickTracker(content::RenderView* render_view, | 32 PageClickTracker(content::RenderView* render_view, |
33 PageClickListener* listener); | 33 PageClickListener* listener); |
34 ~PageClickTracker() override; | 34 ~PageClickTracker() override; |
35 | 35 |
36 private: | 36 private: |
37 // RenderView::Observer implementation. | 37 // RenderView::Observer implementation. |
38 void OnDestruct() override; | 38 void OnDestruct() override; |
39 void DidHandleMouseEvent(const blink::WebMouseEvent& event) override; | 39 void DidHandleMouseEvent(const blink::WebMouseEvent& event) override; |
40 void DidHandleGestureEvent(const blink::WebGestureEvent& event) override; | 40 void DidHandleGestureEvent(const blink::WebGestureEvent& event) override; |
41 void FocusedNodeChanged(const blink::WebNode& node) override; | 41 void FocusedNodeChanged(const blink::WebNode& node) override; |
42 void FocusChangeComplete() override; | 42 void ImeShownAnimationsComplete() override; |
43 | 43 |
44 // Called there is a tap or click at |x|, |y|. | 44 // Called there is a tap or click at |x|, |y|. |
45 void PotentialActivationAt(int x, int y); | 45 void PotentialActivationAt(int x, int y); |
46 | 46 |
47 // The node that was clicked. Non-null only when the animations caused by | 47 // The node that was clicked. Non-null only when the animations caused by |
48 // focus change are still ongoing. | 48 // focus change are still ongoing. |
49 blink::WebNode clicked_node_; | 49 blink::WebNode clicked_node_; |
50 | 50 |
51 // This is set to false when the focus changes, then set back to true soon | 51 // This is set to false when the focus changes, then set back to true soon |
52 // afterwards. This helps track whether an event happened after a node was | 52 // afterwards. This helps track whether an event happened after a node was |
53 // already focused, or if it caused the focus to change. | 53 // already focused, or if it caused the focus to change. |
54 bool was_focused_before_now_; | 54 bool was_focused_before_now_; |
55 | 55 |
56 // The listener getting the actual notifications. | 56 // The listener getting the actual notifications. |
57 PageClickListener* listener_; | 57 PageClickListener* listener_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(PageClickTracker); | 59 DISALLOW_COPY_AND_ASSIGN(PageClickTracker); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace autofill | 62 } // namespace autofill |
63 | 63 |
64 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ | 64 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ |
OLD | NEW |