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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.mm

Issue 2342723002: Reland: Update image and text color when row is selected in the chooser on Mac (Closed)
Patch Set: fixed Mac asan test Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h" 5 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "chrome/browser/chooser_controller/chooser_controller.h" 8 #include "chrome/browser/chooser_controller/chooser_controller.h"
9 #import "chrome/browser/ui/cocoa/chooser_content_view_cocoa.h" 9 #import "chrome/browser/ui/cocoa/chooser_content_view_cocoa.h"
10 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h" 10 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 shouldEditTableColumn:(NSTableColumn*)aTableColumn 55 shouldEditTableColumn:(NSTableColumn*)aTableColumn
56 row:(NSInteger)rowIndex { 56 row:(NSInteger)rowIndex {
57 return NO; 57 return NO;
58 } 58 }
59 59
60 - (CGFloat)tableView:(NSTableView*)tableView heightOfRow:(NSInteger)row { 60 - (CGFloat)tableView:(NSTableView*)tableView heightOfRow:(NSInteger)row {
61 return [chooserContentView_ tableRowViewHeight:row]; 61 return [chooserContentView_ tableRowViewHeight:row];
62 } 62 }
63 63
64 - (void)tableViewSelectionDidChange:(NSNotification*)aNotification { 64 - (void)tableViewSelectionDidChange:(NSNotification*)aNotification {
65 [chooserContentView_ updateContentRowColor];
65 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0]; 66 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0];
66 } 67 }
67 68
68 - (void)onConnect:(id)sender { 69 - (void)onConnect:(id)sender {
69 [chooserContentView_ accept]; 70 [chooserContentView_ accept];
70 chooserDialogCocoa_->Dismissed(); 71 chooserDialogCocoa_->Dismissed();
71 } 72 }
72 73
73 - (void)onCancel:(id)sender { 74 - (void)onCancel:(id)sender {
74 [chooserContentView_ cancel]; 75 [chooserContentView_ cancel];
75 chooserDialogCocoa_->Dismissed(); 76 chooserDialogCocoa_->Dismissed();
76 } 77 }
77 78
78 - (ChooserContentViewCocoa*)chooserContentView { 79 - (ChooserContentViewCocoa*)chooserContentView {
79 return chooserContentView_.get(); 80 return chooserContentView_.get();
80 } 81 }
81 82
82 @end 83 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698