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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: Combines 2 calls to InvalidateRow to 1 OnSelectedRowChanged call. Created 3 years, 9 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/cocoa/autofill/autofill_popup_view_bridge.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
index 4de725fe0755917dbc64529cfe9ce8d40eb8950b..ddf6546e69e5b01741b34534b4af091d8c03e0ab 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.mm
@@ -45,17 +45,23 @@ void AutofillPopupViewBridge::Show() {
[view_ showPopup];
}
-void AutofillPopupViewBridge::InvalidateRow(size_t row) {
- [view_ invalidateRow:row];
-}
+void AutofillPopupViewBridge::OnSelectedRowChanged(
+ size_t previous_row_selection,
+ size_t current_row_selection) {
+ if (previous_row_selection != kNoSelection &&
+ previous_row_selection < controller_->GetLineCount())
+ [view_ invalidateRow:previous_row_selection];
+ if (current_row_selection != kNoSelection) {
+ [view_ invalidateRow:current_row_selection];
+ }
-void AutofillPopupViewBridge::UpdateBoundsAndRedrawPopup() {
- [view_ updateBoundsAndRedrawPopup];
-}
+ void AutofillPopupViewBridge::OnSuggestionsChanged() {
+ [view_ updateBoundsAndRedrawPopup];
+ }
-AutofillPopupView* AutofillPopupView::Create(
- AutofillPopupController* controller) {
- return new AutofillPopupViewBridge(controller);
-}
+ AutofillPopupView* AutofillPopupView::Create(AutofillPopupController *
+ controller) {
+ return new AutofillPopupViewBridge(controller);
+ }
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698