| 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 #include "components/autofill/content/renderer/page_click_tracker.h" | 5 #include "components/autofill/content/renderer/page_click_tracker.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "components/autofill/content/renderer/form_autofill_util.h" | 8 #include "components/autofill/content/renderer/form_autofill_util.h" |
| 9 #include "components/autofill/content/renderer/page_click_listener.h" | 9 #include "components/autofill/content/renderer/page_click_listener.h" |
| 10 #include "components/autofill/core/common/autofill_util.h" | 10 #include "components/autofill/core/common/autofill_util.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 if (!control.isNull()) { | 96 if (!control.isNull()) { |
| 97 listener_->FormControlElementClicked(control, | 97 listener_->FormControlElementClicked(control, |
| 98 was_focused_before_now_); | 98 was_focused_before_now_); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 was_focused_before_now_ = true; | 102 was_focused_before_now_ = true; |
| 103 focused_node_was_last_clicked_ = false; | 103 focused_node_was_last_clicked_ = false; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void PageClickTracker::OnDestruct() { |
| 107 delete this; |
| 108 } |
| 109 |
| 106 // PageClickTracker::Legacy ---------------------------------------------------- | 110 // PageClickTracker::Legacy ---------------------------------------------------- |
| 107 | 111 |
| 108 PageClickTracker::Legacy::Legacy(PageClickTracker* tracker) | 112 PageClickTracker::Legacy::Legacy(PageClickTracker* tracker) |
| 109 : content::RenderViewObserver(tracker->render_frame()->GetRenderView()), | 113 : content::RenderViewObserver(tracker->render_frame()->GetRenderView()), |
| 110 tracker_(tracker) { | 114 tracker_(tracker) { |
| 111 } | 115 } |
| 112 | 116 |
| 113 void PageClickTracker::Legacy::OnDestruct() { | 117 void PageClickTracker::Legacy::OnDestruct() { |
| 114 // No-op. Don't delete |this|. | 118 // No-op. Don't delete |this|. |
| 115 } | 119 } |
| 116 | 120 |
| 117 void PageClickTracker::Legacy::OnMouseDown(const WebNode& mouse_down_node) { | 121 void PageClickTracker::Legacy::OnMouseDown(const WebNode& mouse_down_node) { |
| 118 tracker_->OnMouseDown(mouse_down_node); | 122 tracker_->OnMouseDown(mouse_down_node); |
| 119 } | 123 } |
| 120 | 124 |
| 121 void PageClickTracker::Legacy::FocusChangeComplete() { | 125 void PageClickTracker::Legacy::FocusChangeComplete() { |
| 122 tracker_->FocusChangeComplete(); | 126 tracker_->FocusChangeComplete(); |
| 123 } | 127 } |
| 124 | 128 |
| 125 } // namespace autofill | 129 } // namespace autofill |
| OLD | NEW |