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

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
index 2fa7ba5d84a0f4b331f0435a4bb0e8783ffe1383..e98b28fb1debd2eeb064814a69286116bbd55b58 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
@@ -24,10 +24,9 @@ AutofillPopupViewViews::AutofillPopupViewViews(
AutofillPopupController* controller,
views::Widget* parent_widget)
: AutofillPopupBaseView(controller, parent_widget),
+ AutofillPopupView(controller),
controller_(controller) {}
-AutofillPopupViewViews::~AutofillPopupViewViews() {}
-
void AutofillPopupViewViews::Show() {
DoShow();
}
@@ -51,7 +50,7 @@ void AutofillPopupViewViews::OnPaint(gfx::Canvas* canvas) {
OnPaintBorder(canvas);
for (size_t i = 0; i < controller_->GetLineCount(); ++i) {
- gfx::Rect line_rect = controller_->GetRowBounds(i);
+ gfx::Rect line_rect = GetRowBounds(i);
if (controller_->GetSuggestionAt(i).frontend_id ==
POPUP_ITEM_ID_SEPARATOR) {
@@ -63,7 +62,7 @@ void AutofillPopupViewViews::OnPaint(gfx::Canvas* canvas) {
}
void AutofillPopupViewViews::InvalidateRow(size_t row) {
- SchedulePaintInRect(controller_->GetRowBounds(row));
+ SchedulePaintInRect(GetRowBounds(row));
}
void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
@@ -88,10 +87,9 @@ void AutofillPopupViewViews::DrawAutofillEntry(gfx::Canvas* canvas,
// Draw the Autofill icon, if one exists
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- int row_height = controller_->GetRowBounds(index).height();
+ int row_height = GetRowBounds(index).height();
if (!controller_->GetSuggestionAt(index).icon.empty()) {
- int icon = controller_->GetIconResourceID(
- controller_->GetSuggestionAt(index).icon);
+ int icon = GetIconResourceID(controller_->GetSuggestionAt(index).icon);
DCHECK_NE(-1, icon);
const gfx::ImageSkia* image = rb.GetImageSkiaNamed(icon);
int icon_y = entry_rect.y() + (row_height - image->height()) / 2;

Powered by Google App Engine
This is Rietveld 408576698