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

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

Issue 2382373002: Update chooser row view when mouse click down and move over rows (Closed)
Patch Set: update chooser row view when mouse click down and move over rows 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 [chooserContentView_ updateContentRowColor];
66 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0]; 66 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0];
67 } 67 }
68 68
69 // Selection changes (while the mouse button is still down).
70 - (void)tableViewSelectionIsChanging:(NSNotification*)aNotification {
71 [chooserContentView_ updateContentRowColor];
72 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0];
73 }
74
69 - (void)onConnect:(id)sender { 75 - (void)onConnect:(id)sender {
70 [chooserContentView_ accept]; 76 [chooserContentView_ accept];
71 chooserDialogCocoa_->Dismissed(); 77 chooserDialogCocoa_->Dismissed();
72 } 78 }
73 79
74 - (void)onCancel:(id)sender { 80 - (void)onCancel:(id)sender {
75 [chooserContentView_ cancel]; 81 [chooserContentView_ cancel];
76 chooserDialogCocoa_->Dismissed(); 82 chooserDialogCocoa_->Dismissed();
77 } 83 }
78 84
79 - (ChooserContentViewCocoa*)chooserContentView { 85 - (ChooserContentViewCocoa*)chooserContentView {
80 return chooserContentView_.get(); 86 return chooserContentView_.get();
81 } 87 }
82 88
83 @end 89 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698