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

Side by Side Diff: components/autofill/content/renderer/page_click_listener.h

Issue 140093005: Add supports that allow Autofill to be initiated from textarea field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update codes as per Ilya's 2nd set comments Created 6 years, 9 months 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 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_
7 7
8 namespace blink { 8 namespace blink {
9 class WebInputElement; 9 class WebFormControlElement;
10 } 10 }
11 11
12 namespace autofill { 12 namespace autofill {
13 13
14 // Interface that should be implemented by classes interested in getting 14 // Interface that should be implemented by classes interested in getting
15 // notifications for clicks on a page. 15 // notifications for clicks on a page.
16 // Register on the PageListenerTracker object. 16 // Register on the PageListenerTracker object.
17 class PageClickListener { 17 class PageClickListener {
18 public: 18 public:
19 // Notification that |element| was clicked. 19 // Notification that |element| was clicked.
20 // |was_focused| is true if |element| had focus BEFORE the click. 20 // |was_focused| is true if |element| had focus BEFORE the click.
21 // |is_focused| is true if |element| has focus AFTER the click was processed. 21 // |is_focused| is true if |element| has focus AFTER the click was processed.
22 virtual void InputElementClicked(const blink::WebInputElement& element, 22 virtual void FormControlElementClicked(
23 bool was_focused, 23 const blink::WebFormControlElement& element,
24 bool is_focused) = 0; 24 bool was_focused) = 0;
25 25
26 // If the previously focused element was an input field, listeners are 26 // If the previously focused element was an input field or a textarea field,
Ilya Sherman 2014/02/26 00:12:07 nit: "textarea field" -> "textarea"
ziran.sun 2014/02/26 18:11:50 Done.
27 // informed that the text field has lost its focus. 27 // listeners are informed that the text field has lost its focus.
28 virtual void InputElementLostFocus() = 0; 28 virtual void FormControlElementLostFocus() = 0;
29 29
30 protected: 30 protected:
31 virtual ~PageClickListener() {} 31 virtual ~PageClickListener() {}
32 }; 32 };
33 33
34 } // namespace autofill 34 } // namespace autofill
35 35
36 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_ 36 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698