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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" | 11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" |
| 12 #include "ui/accessibility/ax_enums.h" |
12 | 13 |
13 namespace autofill { | 14 namespace autofill { |
14 | 15 |
15 class AutofillPopupController; | 16 class AutofillPopupController; |
16 | 17 |
17 // The interface for creating and controlling a platform-dependent | 18 // The interface for creating and controlling a platform-dependent |
18 // AutofillPopupView. | 19 // AutofillPopupView. |
19 class AutofillPopupView { | 20 class AutofillPopupView { |
20 public: | 21 public: |
21 // Displays the Autofill popup and fills it in with data from the controller. | 22 // Displays the Autofill popup and fills it in with data from the controller. |
22 virtual void Show() = 0; | 23 virtual void Show() = 0; |
23 | 24 |
24 // Hides the popup from view. This will cause the popup to be deleted. | 25 // Hides the popup from view. This will cause the popup to be deleted. |
25 virtual void Hide() = 0; | 26 virtual void Hide() = 0; |
26 | 27 |
27 // Invalidates the given row and redraw it. | 28 // Invalidates the given row and redraws it. |is_selected| is true if the |
28 virtual void InvalidateRow(size_t row) = 0; | 29 // suggestion displayed in |row| is now the selected suggestion. |
| 30 virtual void InvalidateRow(size_t row, bool is_selected) = 0; |
29 | 31 |
30 // Refreshes the position of the popup. | 32 // Refreshes the position and redraws popup when suggestions change. |
31 virtual void UpdateBoundsAndRedrawPopup() = 0; | 33 virtual void OnSuggestionsChanged() = 0; |
32 | 34 |
33 // Factory function for creating the view. | 35 // Factory function for creating the view. |
34 static AutofillPopupView* Create(AutofillPopupController* controller); | 36 static AutofillPopupView* Create(AutofillPopupController* controller); |
35 | 37 |
36 protected: | 38 protected: |
37 virtual ~AutofillPopupView() {} | 39 virtual ~AutofillPopupView() {} |
38 }; | 40 }; |
39 | 41 |
40 } // namespace autofill | 42 } // namespace autofill |
41 | 43 |
42 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 44 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
OLD | NEW |