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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 friend class Legacy; | 52 friend class Legacy; |
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 void DoFocusChangeComplete(); |
62 | 63 |
63 // True when the last click was on the focused node. | 64 // True when the last click was on the focused node. |
64 bool focused_node_was_last_clicked_; | 65 bool focused_node_was_last_clicked_; |
65 | 66 |
66 // This is set to false when the focus changes, then set back to true soon | 67 // This is set to false when the focus changes, then set back to true soon |
67 // afterwards. This helps track whether an event happened after a node was | 68 // afterwards. This helps track whether an event happened after a node was |
68 // already focused, or if it caused the focus to change. | 69 // already focused, or if it caused the focus to change. |
69 bool was_focused_before_now_; | 70 bool was_focused_before_now_; |
70 | 71 |
71 // The listener getting the actual notifications. | 72 // The listener getting the actual notifications. |
72 PageClickListener* listener_; | 73 PageClickListener* listener_; |
73 | 74 |
74 Legacy legacy_; | 75 Legacy legacy_; |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(PageClickTracker); | 77 DISALLOW_COPY_AND_ASSIGN(PageClickTracker); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace autofill | 80 } // namespace autofill |
80 | 81 |
81 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ | 82 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_TRACKER_H_ |
OLD | NEW |