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

Side by Side 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 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h" 7 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" 10 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 void AutofillPopupViewBridge::Hide() { 40 void AutofillPopupViewBridge::Hide() {
41 delete this; 41 delete this;
42 } 42 }
43 43
44 void AutofillPopupViewBridge::Show() { 44 void AutofillPopupViewBridge::Show() {
45 [view_ showPopup]; 45 [view_ showPopup];
46 } 46 }
47 47
48 void AutofillPopupViewBridge::InvalidateRow(size_t row) { 48 void AutofillPopupViewBridge::OnSelectedRowChanged(
49 [view_ invalidateRow:row]; 49 size_t previous_row_selection,
50 } 50 size_t current_row_selection) {
51 if (previous_row_selection != kNoSelection &&
52 previous_row_selection < controller_->GetLineCount())
53 [view_ invalidateRow:previous_row_selection];
54 if (current_row_selection != kNoSelection) {
55 [view_ invalidateRow:current_row_selection];
56 }
51 57
52 void AutofillPopupViewBridge::UpdateBoundsAndRedrawPopup() { 58 void AutofillPopupViewBridge::OnSuggestionsChanged() {
53 [view_ updateBoundsAndRedrawPopup]; 59 [view_ updateBoundsAndRedrawPopup];
54 } 60 }
55 61
56 AutofillPopupView* AutofillPopupView::Create( 62 AutofillPopupView* AutofillPopupView::Create(AutofillPopupController *
57 AutofillPopupController* controller) { 63 controller) {
58 return new AutofillPopupViewBridge(controller); 64 return new AutofillPopupViewBridge(controller);
59 } 65 }
60 66
61 } // namespace autofill 67 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698