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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.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 | « chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/website_settings/chooser_bubble_ui_cocoa.h" 5 #import "chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 - (void)updateTableView { 207 - (void)updateTableView {
208 [chooserContentView_ updateTableView]; 208 [chooserContentView_ updateTableView];
209 } 209 }
210 210
211 - (void)tableViewSelectionDidChange:(NSNotification*)aNotification { 211 - (void)tableViewSelectionDidChange:(NSNotification*)aNotification {
212 [chooserContentView_ updateContentRowColor]; 212 [chooserContentView_ updateContentRowColor];
213 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0]; 213 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0];
214 } 214 }
215 215
216 // Selection changes (while the mouse button is still down).
217 - (void)tableViewSelectionIsChanging:(NSNotification*)aNotification {
218 [chooserContentView_ updateContentRowColor];
219 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0];
220 }
221
216 - (void)updateAnchorPosition { 222 - (void)updateAnchorPosition {
217 [self setParentWindow:[self getExpectedParentWindow]]; 223 [self setParentWindow:[self getExpectedParentWindow]];
218 [self setAnchorPoint:[self getExpectedAnchorPoint]]; 224 [self setAnchorPoint:[self getExpectedAnchorPoint]];
219 } 225 }
220 226
221 - (NSPoint)getExpectedAnchorPoint { 227 - (NSPoint)getExpectedAnchorPoint {
222 NSPoint anchor; 228 NSPoint anchor;
223 if ([self hasLocationBar]) { 229 if ([self hasLocationBar]) {
224 LocationBarViewMac* locationBar = 230 LocationBarViewMac* locationBar =
225 [[[self getExpectedParentWindow] windowController] locationBarBridge]; 231 [[[self getExpectedParentWindow] windowController] locationBarBridge];
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 322 }
317 323
318 void ChooserBubbleUiCocoa::UpdateAnchorPosition() { 324 void ChooserBubbleUiCocoa::UpdateAnchorPosition() {
319 if (chooser_bubble_ui_controller_) 325 if (chooser_bubble_ui_controller_)
320 [chooser_bubble_ui_controller_ updateAnchorPosition]; 326 [chooser_bubble_ui_controller_ updateAnchorPosition];
321 } 327 }
322 328
323 void ChooserBubbleUiCocoa::OnBubbleClosing() { 329 void ChooserBubbleUiCocoa::OnBubbleClosing() {
324 chooser_bubble_ui_controller_ = nil; 330 chooser_bubble_ui_controller_ = nil;
325 } 331 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698