Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_view.h

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nit Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "ui/gfx/native_widget_types.h" 10 #include "base/strings/string16.h"
11 11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
12 namespace gfx {
13 class Rect;
14 }
15
16 namespace ui {
17 class KeyEvent;
18 }
19 12
20 namespace autofill { 13 namespace autofill {
21 14
22 class AutofillPopupController; 15 class AutofillPopupController;
23 16
24 // The interface for creating and controlling a platform-dependent 17 // The interface for creating and controlling a platform-dependent
25 // AutofillPopupView. 18 // AutofillPopupView.
26 class AutofillPopupView { 19 class AutofillPopupView {
27 public: 20 public:
28 // The minimum amount of padding between the Autofill name and subtext,
29 // in pixels.
30 static const size_t kNamePadding = 15;
31
32 // The amount of padding between icons in pixels.
33 static const int kIconPadding = 5;
34
35 // The amount of padding at the end of the popup in pixels.
36 static const int kEndPadding = 3;
37
38 // Height of the delete icon in pixels.
39 static const int kDeleteIconHeight = 16;
40
41 // Width of the delete icon in pixels.
42 static const int kDeleteIconWidth = 16;
43
44 // Displays the Autofill popup and fills it in with data from the controller. 21 // Displays the Autofill popup and fills it in with data from the controller.
45 virtual void Show() = 0; 22 virtual void Show() = 0;
46 23
47 // Hides the popup from view. This will cause the popup to be deleted. 24 // Hides the popup from view. This will cause the popup to be deleted.
48 virtual void Hide() = 0; 25 virtual void Hide() = 0;
49 26
50 // Invalidates the given row and redraw it. 27 // Invalidates the given row and redraw it.
51 virtual void InvalidateRow(size_t row) = 0; 28 virtual void InvalidateRow(size_t row) = 0;
52 29
53 // Refreshes the position of the popup. 30 // Refreshes the position of the popup.
54 virtual void UpdateBoundsAndRedrawPopup() = 0; 31 virtual void UpdateBoundsAndRedrawPopup() = 0;
55 32
56 // Factory function for creating the view. 33 // Factory function for creating the view.
57 static AutofillPopupView* Create(AutofillPopupController* controller); 34 static AutofillPopupView* Create(AutofillPopupController* controller);
58 35
59 protected: 36 protected:
60 virtual ~AutofillPopupView() {} 37 virtual ~AutofillPopupView() {}
61 }; 38 };
62 39
63 } // namespace autofill 40 } // namespace autofill
64 41
65 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 42 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698