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

Side by Side Diff: components/autofill/content/renderer/page_click_tracker.cc

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests some more Created 6 years 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 unified diff | Download patch
OLDNEW
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/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "components/autofill/content/renderer/form_autofill_util.h" 9 #include "components/autofill/content/renderer/form_autofill_util.h"
10 #include "components/autofill/content/renderer/page_click_listener.h" 10 #include "components/autofill/content/renderer/page_click_listener.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 PageClickListener* listener) 68 PageClickListener* listener)
69 : content::RenderViewObserver(render_view), 69 : content::RenderViewObserver(render_view),
70 was_focused_before_now_(false), 70 was_focused_before_now_(false),
71 listener_(listener), 71 listener_(listener),
72 weak_ptr_factory_(this) { 72 weak_ptr_factory_(this) {
73 } 73 }
74 74
75 PageClickTracker::~PageClickTracker() { 75 PageClickTracker::~PageClickTracker() {
76 } 76 }
77 77
78 void PageClickTracker::OnDestruct() {
79 // No-op. Don't delete |this|.
80 }
81
78 void PageClickTracker::DidHandleMouseEvent(const WebMouseEvent& event) { 82 void PageClickTracker::DidHandleMouseEvent(const WebMouseEvent& event) {
79 if (event.type != WebInputEvent::MouseDown || 83 if (event.type != WebInputEvent::MouseDown ||
80 event.button != WebMouseEvent::ButtonLeft) { 84 event.button != WebMouseEvent::ButtonLeft) {
81 return; 85 return;
82 } 86 }
83 87
84 PotentialActivationAt(event.x, event.y); 88 PotentialActivationAt(event.x, event.y);
85 } 89 }
86 90
87 void PageClickTracker::DidHandleGestureEvent( 91 void PageClickTracker::DidHandleGestureEvent(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 listener_->FormControlElementClicked(textarea_element, 128 listener_->FormControlElementClicked(textarea_element,
125 was_focused_before_now_); 129 was_focused_before_now_);
126 } 130 }
127 } 131 }
128 132
129 void PageClickTracker::SetWasFocused() { 133 void PageClickTracker::SetWasFocused() {
130 was_focused_before_now_ = true; 134 was_focused_before_now_ = true;
131 } 135 }
132 136
133 } // namespace autofill 137 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698