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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
8 #include "ui/gfx/native_widget_types.h"
20 class AutofillPopupController
;
22 // The interface for creating and controlling a platform-dependent
24 class AutofillPopupView
{
26 // The minimum amount of padding between the Autofill name and subtext,
28 static const size_t kNamePadding
= 15;
30 // The amount of padding between icons in pixels.
31 static const int kIconPadding
= 5;
33 // The amount of padding at the end of the popup in pixels.
34 static const int kEndPadding
= 3;
36 // Height of the delete icon in pixels.
37 static const int kDeleteIconHeight
= 16;
39 // Width of the delete icon in pixels.
40 static const int kDeleteIconWidth
= 16;
42 // Displays the Autofill popup and fills it in with data from the controller.
43 virtual void Show() = 0;
45 // Hides the popup from view. This will cause the popup to be deleted.
46 virtual void Hide() = 0;
48 // Invalidates the given row and redraw it.
49 virtual void InvalidateRow(size_t row
) = 0;
51 // Refreshes the position of the popup.
52 virtual void UpdateBoundsAndRedrawPopup() = 0;
54 // Factory function for creating the view.
55 static AutofillPopupView
* Create(AutofillPopupController
* controller
);
58 virtual ~AutofillPopupView() {}
61 } // namespace autofill
63 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_