OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 public: | 29 public: |
30 // Called when the popup should get hidden. | 30 // Called when the popup should get hidden. |
31 virtual void Hide() = 0; | 31 virtual void Hide() = 0; |
32 | 32 |
33 // Called whent the popup view was destroyed. | 33 // Called whent the popup view was destroyed. |
34 virtual void ViewDestroyed() = 0; | 34 virtual void ViewDestroyed() = 0; |
35 | 35 |
36 // Recalculates the height and width of the popup and triggers a redraw. | 36 // Recalculates the height and width of the popup and triggers a redraw. |
37 virtual void UpdateBoundsAndRedrawPopup() = 0; | 37 virtual void UpdateBoundsAndRedrawPopup() = 0; |
38 | 38 |
39 // The user has moved the mouse within the popup. | 39 // The user selected the line at (x, y), e.g. by hovering the mouse cursor. |
40 virtual void MouseHovered(int x, int y) = 0; | 40 // |x| and |y| must be in the popup coordinates. |
| 41 virtual void LineSelectedAtPoint(int x, int y) = 0; |
41 | 42 |
42 // The user clicked the mouse within the popup. | 43 // The user accepted the line at (x, y); e.g., by clicking on it using the |
43 virtual void MouseClicked(int x, int y) = 0; | 44 // mouse. |x| and |y| must be in the popup coordinates. |
| 45 virtual void LineAcceptedAtPoint(int x, int y) = 0; |
44 | 46 |
45 // The user has moved the mouse outside of the popup. | 47 // The user cleared the selected line, e.g. by moving the mouse cursor out of |
46 virtual void MouseExitedPopup() = 0; | 48 // the popup bounds. |
| 49 virtual void SelectionCleared() = 0; |
47 | 50 |
48 // Whether |event| should be reposted to the native window management. | 51 // Whether |event| should be reposted to the native window management. |
49 virtual bool ShouldRepostEvent(const ui::MouseEvent& event) = 0; | 52 virtual bool ShouldRepostEvent(const ui::MouseEvent& event) = 0; |
50 | 53 |
51 // Accepts the suggestion at |index|. | 54 // Accepts the suggestion at |index|. |
52 virtual void AcceptSuggestion(size_t index) = 0; | 55 virtual void AcceptSuggestion(size_t index) = 0; |
53 | 56 |
54 // Gets the resource value for the given resource, returning -1 if the | 57 // Gets the resource value for the given resource, returning -1 if the |
55 // resource isn't recognized. | 58 // resource isn't recognized. |
56 virtual int GetIconResourceID(const string16& resource_name) = 0; | 59 virtual int GetIconResourceID(const string16& resource_name) = 0; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // Whether the view should be hidden on outside mouse presses. | 113 // Whether the view should be hidden on outside mouse presses. |
111 virtual bool hide_on_outside_click() const = 0; | 114 virtual bool hide_on_outside_click() const = 0; |
112 | 115 |
113 protected: | 116 protected: |
114 virtual ~AutofillPopupController() {} | 117 virtual ~AutofillPopupController() {} |
115 }; | 118 }; |
116 | 119 |
117 } // namespace autofill | 120 } // namespace autofill |
118 | 121 |
119 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 122 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
OLD | NEW |