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

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

Issue 12188020: Adding the page and DPI scale adjustment for Autofill Popups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Ted's nits Created 7 years, 10 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 | Annotate | Revision Log
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_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"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 class Font; 15 class Font;
16 class Point; 16 class Point;
17 class Rect; 17 class Rect;
18 class RectF;
18 } 19 }
19 20
20 // This interface provides data to an AutofillPopupView. 21 // This interface provides data to an AutofillPopupView.
21 class AutofillPopupController { 22 class AutofillPopupController {
22 public: 23 public:
23 // Called when the view is going down. 24 // Called when the view is going down.
24 virtual void ViewDestroyed() = 0; 25 virtual void ViewDestroyed() = 0;
25 26
26 // Recalculates the height and width of the popup and triggers a redraw. 27 // Recalculates the height and width of the popup and triggers a redraw.
27 virtual void UpdateBoundsAndRedrawPopup() = 0; 28 virtual void UpdateBoundsAndRedrawPopup() = 0;
(...skipping 24 matching lines...) Expand all
52 // the top left of the popup. 53 // the top left of the popup.
53 virtual gfx::Rect GetRowBounds(size_t index) = 0; 54 virtual gfx::Rect GetRowBounds(size_t index) = 0;
54 55
55 // The actual bounds of the popup. 56 // The actual bounds of the popup.
56 virtual const gfx::Rect& popup_bounds() const = 0; 57 virtual const gfx::Rect& popup_bounds() const = 0;
57 58
58 // The view that the form field element sits in. 59 // The view that the form field element sits in.
59 virtual gfx::NativeView container_view() const = 0; 60 virtual gfx::NativeView container_view() const = 0;
60 61
61 // The bounds of the form field element (screen coordinates). 62 // The bounds of the form field element (screen coordinates).
62 virtual const gfx::Rect& element_bounds() const = 0; 63 virtual const gfx::RectF& element_bounds() const = 0;
63 64
64 // The main labels for each autofill item. 65 // The main labels for each autofill item.
65 virtual const std::vector<string16>& names() const = 0; 66 virtual const std::vector<string16>& names() const = 0;
66 67
67 // Smaller labels for each autofill item. 68 // Smaller labels for each autofill item.
68 virtual const std::vector<string16>& subtexts() const = 0; 69 virtual const std::vector<string16>& subtexts() const = 0;
69 70
70 // A string which identifies the icon to be shown for each autofill item. 71 // A string which identifies the icon to be shown for each autofill item.
71 virtual const std::vector<string16>& icons() const = 0; 72 virtual const std::vector<string16>& icons() const = 0;
72 73
(...skipping 10 matching lines...) Expand all
83 virtual int selected_line() const = 0; 84 virtual int selected_line() const = 0;
84 85
85 // Returns true if the delete icon of the selected line is currently hovered. 86 // Returns true if the delete icon of the selected line is currently hovered.
86 virtual bool delete_icon_hovered() const = 0; 87 virtual bool delete_icon_hovered() const = 0;
87 88
88 protected: 89 protected:
89 virtual ~AutofillPopupController() {} 90 virtual ~AutofillPopupController() {}
90 }; 91 };
91 92
92 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ 93 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698