| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |