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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm

Issue 1837803002: Revert of Add keyboard accessibility to ConstrainedWindowButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/constrained_window/constrained_window_button.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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 bubbleFrame.origin = currentWindowFrame.origin; 323 bubbleFrame.origin = currentWindowFrame.origin;
324 bubbleFrame.origin.y = bubbleFrame.origin.y + 324 bubbleFrame.origin.y = bubbleFrame.origin.y +
325 currentWindowFrame.size.height - 325 currentWindowFrame.size.height -
326 bubbleFrame.size.height; 326 bubbleFrame.size.height;
327 [[self window] setFrame:bubbleFrame display:YES]; 327 [[self window] setFrame:bubbleFrame display:YES];
328 } else { 328 } else {
329 [[self window] setFrame:bubbleFrame display:NO]; 329 [[self window] setFrame:bubbleFrame display:NO];
330 [self setAnchorPoint:[self getExpectedAnchorPoint]]; 330 [self setAnchorPoint:[self getExpectedAnchorPoint]];
331 [self showWindow:nil]; 331 [self showWindow:nil];
332 [[self window] makeFirstResponder:nil]; 332 [[self window] makeFirstResponder:nil];
333 [[self window] setInitialFirstResponder:tableView_.get()]; 333 [[self window] setInitialFirstResponder:connectButton_.get()];
334 } 334 }
335 } 335 }
336 336
337 - (NSInteger)numberOfRowsInTableView:(NSTableView*)tableView { 337 - (NSInteger)numberOfRowsInTableView:(NSTableView*)tableView {
338 // When there are no devices, the table contains a message saying there are 338 // When there are no devices, the table contains a message saying there are
339 // no devices, so the number of rows is always at least 1. 339 // no devices, so the number of rows is always at least 1.
340 return std::max( 340 return std::max(
341 static_cast<NSInteger>(chooserBubbleController_->NumOptions()), 341 static_cast<NSInteger>(chooserBubbleController_->NumOptions()),
342 static_cast<NSInteger>(1)); 342 static_cast<NSInteger>(1));
343 } 343 }
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 [chooser_bubble_ui_controller_ onOptionAdded:static_cast<NSInteger>(index)]; 576 [chooser_bubble_ui_controller_ onOptionAdded:static_cast<NSInteger>(index)];
577 } 577 }
578 578
579 void ChooserBubbleUiCocoa::OnOptionRemoved(size_t index) { 579 void ChooserBubbleUiCocoa::OnOptionRemoved(size_t index) {
580 [chooser_bubble_ui_controller_ onOptionRemoved:static_cast<NSInteger>(index)]; 580 [chooser_bubble_ui_controller_ onOptionRemoved:static_cast<NSInteger>(index)];
581 } 581 }
582 582
583 void ChooserBubbleUiCocoa::OnBubbleClosing() { 583 void ChooserBubbleUiCocoa::OnBubbleClosing() {
584 chooser_bubble_ui_controller_ = nil; 584 chooser_bubble_ui_controller_ = nil;
585 } 585 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/constrained_window/constrained_window_button.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698