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

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

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix round-down problems Created 7 years, 2 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"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual int GetIconResourceID(const string16& resource_name) = 0; 56 virtual int GetIconResourceID(const string16& resource_name) = 0;
57 57
58 // Returns true if the given index refers to an element that can be deleted. 58 // Returns true if the given index refers to an element that can be deleted.
59 virtual bool CanDelete(size_t index) const = 0; 59 virtual bool CanDelete(size_t index) const = 0;
60 60
61 // Returns true if the given index refers to an element that is a warning 61 // Returns true if the given index refers to an element that is a warning
62 // rather than an Autofill suggestion. 62 // rather than an Autofill suggestion.
63 virtual bool IsWarning(size_t index) const = 0; 63 virtual bool IsWarning(size_t index) const = 0;
64 64
65 // Updates the bounds of the popup and initiates a redraw. 65 // Updates the bounds of the popup and initiates a redraw.
66 virtual void SetPopupBounds(const gfx::Rect& bounds) = 0; 66 virtual void SetPopupBounds(const gfx::RectF& bounds) = 0;
sky 2013/10/03 14:19:23 Why do any of the changes in this file require flo
jianli 2013/10/03 18:42:17 On Mac, bounds are represented as floats underneat
67 67
68 // Returns the bounds of the item at |index| in the popup, relative to 68 // Returns the bounds of the item at |index| in the popup, relative to
69 // the top left of the popup. 69 // the top left of the popup.
70 virtual gfx::Rect GetRowBounds(size_t index) = 0; 70 virtual gfx::RectF GetRowBounds(size_t index) = 0;
71 71
72 // The actual bounds of the popup. 72 // The actual bounds of the popup.
73 virtual const gfx::Rect& popup_bounds() const = 0; 73 virtual const gfx::RectF& popup_bounds() const = 0;
74 74
75 // The view that the form field element sits in. 75 // The view that the form field element sits in.
76 virtual gfx::NativeView container_view() const = 0; 76 virtual gfx::NativeView container_view() const = 0;
77 77
78 // The bounds of the form field element (screen coordinates). 78 // The bounds of the form field element (screen coordinates).
79 virtual const gfx::RectF& element_bounds() const = 0; 79 virtual const gfx::RectF& element_bounds() const = 0;
80 80
81 // If the current popup should be displayed in RTL mode. 81 // If the current popup should be displayed in RTL mode.
82 virtual bool IsRTL() const = 0; 82 virtual bool IsRTL() const = 0;
83 83
(...skipping 26 matching lines...) Expand all
110 // Whether the view should be hidden on outside mouse presses. 110 // Whether the view should be hidden on outside mouse presses.
111 virtual bool hide_on_outside_click() const = 0; 111 virtual bool hide_on_outside_click() const = 0;
112 112
113 protected: 113 protected:
114 virtual ~AutofillPopupController() {} 114 virtual ~AutofillPopupController() {}
115 }; 115 };
116 116
117 } // namespace autofill 117 } // namespace autofill
118 118
119 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ 119 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698