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

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

Issue 1782513002: [Extensions UI Mac] Don't let the top-level actions container be first responder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_actions_container_view.h" 5 #import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #import "chrome/browser/ui/cocoa/view_id_util.h" 10 #import "chrome/browser/ui/cocoa/view_id_util.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 resizable_ = !isOverflow_; 189 resizable_ = !isOverflow_;
190 [self setNeedsDisplay:YES]; 190 [self setNeedsDisplay:YES];
191 } 191 }
192 } 192 }
193 193
194 - (void)resetCursorRects { 194 - (void)resetCursorRects {
195 [self addCursorRect:grippyRect_ cursor:[self appropriateCursorForGrippy]]; 195 [self addCursorRect:grippyRect_ cursor:[self appropriateCursorForGrippy]];
196 } 196 }
197 197
198 - (BOOL)acceptsFirstResponder { 198 - (BOOL)acceptsFirstResponder {
199 return YES; 199 // The overflow container needs to receive key events to handle in-item
200 // navigation. The top-level container should not become first responder,
201 // allowing focus travel to proceed to the first action.
202 return isOverflow_;
200 } 203 }
201 204
202 - (void)mouseEntered:(NSEvent*)theEvent { 205 - (void)mouseEntered:(NSEvent*)theEvent {
203 [[NSNotificationCenter defaultCenter] 206 [[NSNotificationCenter defaultCenter]
204 postNotificationName:kBrowserActionsContainerMouseEntered 207 postNotificationName:kBrowserActionsContainerMouseEntered
205 object:self]; 208 object:self];
206 } 209 }
207 210
208 - (void)mouseDown:(NSEvent*)theEvent { 211 - (void)mouseDown:(NSEvent*)theEvent {
209 initialDragPoint_ = [self convertPoint:[theEvent locationInWindow] 212 initialDragPoint_ = [self convertPoint:[theEvent locationInWindow]
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 retVal = [NSCursor resizeLeftRightCursor]; 374 retVal = [NSCursor resizeLeftRightCursor];
372 } 375 }
373 return retVal; 376 return retVal;
374 } 377 }
375 378
376 - (CGFloat)maxAllowedWidth { 379 - (CGFloat)maxAllowedWidth {
377 return delegate_ ? delegate_->GetMaxAllowedWidth() : CGFLOAT_MAX; 380 return delegate_ ? delegate_->GetMaxAllowedWidth() : CGFLOAT_MAX;
378 } 381 }
379 382
380 @end 383 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698