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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 // RenderFrameObserver implementation. | 54 // RenderFrameObserver implementation. |
55 void FocusedNodeChanged(const blink::WebNode& node) override; | 55 void FocusedNodeChanged(const blink::WebNode& node) override; |
56 | 56 |
57 // RenderViewObserver methods forwarded from Legacy. Should be | 57 // RenderViewObserver methods forwarded from Legacy. Should be |
58 // merged into RenderFrameObserver. | 58 // merged into RenderFrameObserver. |
59 void DidHandleMouseEvent(const blink::WebMouseEvent& event); | 59 void DidHandleMouseEvent(const blink::WebMouseEvent& event); |
60 void DidHandleGestureEvent(const blink::WebGestureEvent& event); | 60 void DidHandleGestureEvent(const blink::WebGestureEvent& event); |
61 void FocusChangeComplete(); | 61 void FocusChangeComplete(); |
62 | 62 |
63 // Called there is a tap or click at |x|, |y|. | |
64 void PotentialActivationAt(int x, int y); | |
65 | |
66 // True when the last click was on the focused node. | 63 // True when the last click was on the focused node. |
67 bool focused_node_was_last_clicked_; | 64 bool focused_node_was_last_clicked_; |
68 | 65 |
69 // This is set to false when the focus changes, then set back to true soon | 66 // This is set to false when the focus changes, then set back to true soon |
70 // afterwards. This helps track whether an event happened after a node was | 67 // afterwards. This helps track whether an event happened after a node was |
71 // already focused, or if it caused the focus to change. | 68 // already focused, or if it caused the focus to change. |
72 bool was_focused_before_now_; | 69 bool was_focused_before_now_; |
73 | 70 |
74 // The listener getting the actual notifications. | 71 // The listener getting the actual notifications. |
75 PageClickListener* listener_; | 72 PageClickListener* listener_; |
76 | 73 |
77 Legacy legacy_; | 74 Legacy legacy_; |
78 | 75 |
79 DISALLOW_COPY_AND_ASSIGN(PageClickTracker); | 76 DISALLOW_COPY_AND_ASSIGN(PageClickTracker); |
80 }; | 77 }; |
81 | 78 |
82 } // namespace autofill | 79 } // namespace autofill |
83 | 80 |
84 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ | 81 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ |
OLD | NEW |