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

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: Uses int (instead of size_t) arguments for OnSelectedRowChanged because we need to pass -1. 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(int previous_row_selection,
49 [view_ invalidateRow:row]; 49 int current_row_selection) {
50 if (previous_row_selection != kNoSelection &&
51 previous_row_selection < static_cast<int>(controller_->GetLineCount())) {
52 [view_ invalidateRow:previous_row_selection];
53 }
54
55 if (current_row_selection != kNoSelection) {
56 [view_ invalidateRow:current_row_selection];
57 }
50 } 58 }
51 59
52 void AutofillPopupViewBridge::UpdateBoundsAndRedrawPopup() { 60 void AutofillPopupViewBridge::OnSuggestionsChanged() {
53 [view_ updateBoundsAndRedrawPopup]; 61 [view_ updateBoundsAndRedrawPopup];
54 } 62 }
55 63
56 AutofillPopupView* AutofillPopupView::Create( 64 AutofillPopupView* AutofillPopupView::Create(
57 AutofillPopupController* controller) { 65 AutofillPopupController* controller) {
58 return new AutofillPopupViewBridge(controller); 66 return new AutofillPopupViewBridge(controller);
59 } 67 }
60 68
61 } // namespace autofill 69 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698