| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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 CHROME_RENDERER_PAGE_CLICK_LISTENER_H_ | |
| 6 #define CHROME_RENDERER_PAGE_CLICK_LISTENER_H_ | |
| 7 | |
| 8 namespace WebKit { | |
| 9 class WebInputElement; | |
| 10 } | |
| 11 | |
| 12 // Interface that should be implemented by classes interested in getting | |
| 13 // notifications for clicks on a page. | |
| 14 // Register on the PageListenerTracker object. | |
| 15 class PageClickListener { | |
| 16 public: | |
| 17 // Notification that |element| was clicked. | |
| 18 // |was_focused| is true if |element| had focus BEFORE the click. | |
| 19 // |is_focused| is true if |element| has focus AFTER the click was processed. | |
| 20 // If this method returns true, the notification will not be propagated to | |
| 21 // other listeners. | |
| 22 virtual bool InputElementClicked(const WebKit::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 // If this method returns true, the notification will not be propagated to | |
| 29 // other listeners. | |
| 30 virtual bool InputElementLostFocus() = 0; | |
| 31 | |
| 32 protected: | |
| 33 virtual ~PageClickListener() {} | |
| 34 }; | |
| 35 | |
| 36 #endif // CHROME_RENDERER_PAGE_CLICK_LISTENER_H_ | |
| OLD | NEW |