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 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_ 7 8 namespace blink { 9 class WebInputElement; 10 } 11 12 namespace autofill { 13 14 // Interface that should be implemented by classes interested in getting 15 // notifications for clicks on a page. 16 // Register on the PageListenerTracker object. 17 class PageClickListener { 18 public: 19 // Notification that |element| was clicked. 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. 22 virtual void InputElementClicked(const blink::WebInputElement& element, 23 bool was_focused, 24 bool is_focused) = 0; 25 26 // If the previously focused element was an input field, listeners are 27 // informed that the text field has lost its focus. 28 virtual void InputElementLostFocus() = 0; 29 30 protected: 31 virtual ~PageClickListener() {} 32 }; 33 34 } // namespace autofill 35 36 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PAGE_CLICK_LISTENER_H_ 37