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 "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 | 9 |
10 class AutofillPopupController; | 10 class AutofillPopupController; |
(...skipping 28 matching lines...) Expand all Loading... |
39 // Height of the Autofill icons in pixels. | 39 // Height of the Autofill icons in pixels. |
40 static const int kAutofillIconHeight = 16; | 40 static const int kAutofillIconHeight = 16; |
41 | 41 |
42 // Width of the Autofill icons in pixels. | 42 // Width of the Autofill icons in pixels. |
43 static const int kAutofillIconWidth = 25; | 43 static const int kAutofillIconWidth = 25; |
44 | 44 |
45 // Displays the Autofill popup and fills it in with data from the controller. | 45 // Displays the Autofill popup and fills it in with data from the controller. |
46 virtual void Show() = 0; | 46 virtual void Show() = 0; |
47 | 47 |
48 // Hides the popup from view. This will cause the popup to be deleted. | 48 // Hides the popup from view. This will cause the popup to be deleted. |
49 virtual void Hide() = 0; | 49 // TODO(csharp): Make Hide a pure virtual function again, once hide_call_ is |
| 50 // removed. |
| 51 virtual void Hide(); |
50 | 52 |
51 // Invalidates the given row and redraw it. | 53 // Invalidates the given row and redraw it. |
52 virtual void InvalidateRow(size_t row) = 0; | 54 virtual void InvalidateRow(size_t row) = 0; |
53 | 55 |
54 // Refreshes the position of the popup. | 56 // Refreshes the position of the popup. |
55 virtual void UpdateBoundsAndRedrawPopup() = 0; | 57 virtual void UpdateBoundsAndRedrawPopup() = 0; |
56 | 58 |
57 // Factory function for creating the view. | 59 // Factory function for creating the view. |
58 static AutofillPopupView* Create(AutofillPopupController* controller); | 60 static AutofillPopupView* Create(AutofillPopupController* controller); |
59 | 61 |
60 protected: | 62 protected: |
61 virtual ~AutofillPopupView() {} | 63 AutofillPopupView(); |
| 64 virtual ~AutofillPopupView(); |
| 65 |
| 66 private: |
| 67 // Used to check that the hide function was called, to check that the class |
| 68 // is only destroyed through the Hide function. Remove after Dev channel |
| 69 // release. |
| 70 bool hide_called_; |
62 }; | 71 }; |
63 | 72 |
64 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ | 73 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
OLD | NEW |