| OLD | NEW |
| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 - (CGFloat)tableView:(NSTableView*)tableView heightOfRow:(NSInteger)row { | 203 - (CGFloat)tableView:(NSTableView*)tableView heightOfRow:(NSInteger)row { |
| 204 return [chooserContentView_ tableRowViewHeight:row]; | 204 return [chooserContentView_ tableRowViewHeight:row]; |
| 205 } | 205 } |
| 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 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0]; | 213 [connectButton_ setEnabled:[tableView_ numberOfSelectedRows] > 0]; |
| 213 } | 214 } |
| 214 | 215 |
| 215 - (void)updateAnchorPosition { | 216 - (void)updateAnchorPosition { |
| 216 [self setParentWindow:[self getExpectedParentWindow]]; | 217 [self setParentWindow:[self getExpectedParentWindow]]; |
| 217 [self setAnchorPoint:[self getExpectedAnchorPoint]]; | 218 [self setAnchorPoint:[self getExpectedAnchorPoint]]; |
| 218 } | 219 } |
| 219 | 220 |
| 220 - (NSPoint)getExpectedAnchorPoint { | 221 - (NSPoint)getExpectedAnchorPoint { |
| 221 NSPoint anchor; | 222 NSPoint anchor; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 } | 316 } |
| 316 | 317 |
| 317 void ChooserBubbleUiCocoa::UpdateAnchorPosition() { | 318 void ChooserBubbleUiCocoa::UpdateAnchorPosition() { |
| 318 if (chooser_bubble_ui_controller_) | 319 if (chooser_bubble_ui_controller_) |
| 319 [chooser_bubble_ui_controller_ updateAnchorPosition]; | 320 [chooser_bubble_ui_controller_ updateAnchorPosition]; |
| 320 } | 321 } |
| 321 | 322 |
| 322 void ChooserBubbleUiCocoa::OnBubbleClosing() { | 323 void ChooserBubbleUiCocoa::OnBubbleClosing() { |
| 323 chooser_bubble_ui_controller_ = nil; | 324 chooser_bubble_ui_controller_ = nil; |
| 324 } | 325 } |
| OLD | NEW |