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

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

Issue 11817051: Elide text in the new Autofill UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" 10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Returns true if the popup still has non-options entries to show the user. 121 // Returns true if the popup still has non-options entries to show the user.
122 bool HasSuggestions(); 122 bool HasSuggestions();
123 123
124 AutofillPopupView* view() { return view_; } 124 AutofillPopupView* view() { return view_; }
125 125
126 // |view_| pass throughs (virtual for testing). 126 // |view_| pass throughs (virtual for testing).
127 virtual void ShowView(); 127 virtual void ShowView();
128 virtual void InvalidateRow(size_t row); 128 virtual void InvalidateRow(size_t row);
129 129
130 private: 130 private:
131 // Calculate the width of the row, excluding all the text. This provides
132 // the size of the row that won't be reducable (since all the text can be
Ilya Sherman 2013/01/10 23:34:36 nit: "reducable" -> "reducible"
csharp 2013/01/11 17:51:12 Done.
133 // elided if there isn't enough space).
134 int RowWidthWithoutText(int row);
135
136 // Returns the maximum width (in pixels) that the popup could be before it
137 // would go off the screen edge.
138 virtual int MaxVisiblePopupWidth();
Ilya Sherman 2013/01/10 23:34:36 nit: Why is this virtual? (Add a comment.)
csharp 2013/01/11 17:51:12 Done.
139
131 AutofillPopupView* view_; // Weak reference. 140 AutofillPopupView* view_; // Weak reference.
132 AutofillPopupDelegate* delegate_; // Weak reference. 141 AutofillPopupDelegate* delegate_; // Weak reference.
133 gfx::NativeView container_view_; // Weak reference. 142 gfx::NativeView container_view_; // Weak reference.
134 143
135 // The bounds of the text element that is the focus of the Autofill. 144 // The bounds of the text element that is the focus of the Autofill.
136 // These coordinates are in screen space. 145 // These coordinates are in screen space.
137 const gfx::Rect element_bounds_; 146 const gfx::Rect element_bounds_;
138 147
139 // The bounds of the Autofill popup. 148 // The bounds of the Autofill popup.
140 gfx::Rect popup_bounds_; 149 gfx::Rect popup_bounds_;
(...skipping 18 matching lines...) Expand all
159 bool delete_icon_hovered_; 168 bool delete_icon_hovered_;
160 169
161 // True if |HideInternal| has already been called. 170 // True if |HideInternal| has already been called.
162 bool is_hiding_; 171 bool is_hiding_;
163 172
164 // True if the delegate should be informed when |this| is destroyed. 173 // True if the delegate should be informed when |this| is destroyed.
165 bool inform_delegate_of_destruction_; 174 bool inform_delegate_of_destruction_;
166 }; 175 };
167 176
168 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_ 177 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698