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

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

Issue 1327203003: Mac: Fix missing focus rings on toolbar, profile, and tab buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2490
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_action_button.h" 5 #import "chrome/browser/ui/cocoa/extensions/browser_action_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 imageSize.width, imageSize.height); 542 imageSize.width, imageSize.height);
543 543
544 [self.image drawInRect:imageRect 544 [self.image drawInRect:imageRect
545 fromRect:NSZeroRect 545 fromRect:NSZeroRect
546 operation:NSCompositeSourceOver 546 operation:NSCompositeSourceOver
547 fraction:1.0 547 fraction:1.0
548 respectFlipped:YES 548 respectFlipped:YES
549 hints:nil]; 549 hints:nil];
550 } 550 }
551 551
552 - (void)drawFocusRingMaskWithFrame:(NSRect)cellFrame inView:(NSView*)view {
553 // Match the hover image's bezel.
554 [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(cellFrame, 2, 2)
555 xRadius:2
556 yRadius:2] fill];
557 }
558
552 - (ui::ThemeProvider*)themeProviderForWindow:(NSWindow*)window { 559 - (ui::ThemeProvider*)themeProviderForWindow:(NSWindow*)window {
553 ui::ThemeProvider* themeProvider = [window themeProvider]; 560 ui::ThemeProvider* themeProvider = [window themeProvider];
554 if (!themeProvider) 561 if (!themeProvider)
555 themeProvider = 562 themeProvider =
556 [[browserActionsController_ browser]->window()->GetNativeWindow() 563 [[browserActionsController_ browser]->window()->GetNativeWindow()
557 themeProvider]; 564 themeProvider];
558 return themeProvider; 565 return themeProvider;
559 } 566 }
560 567
561 @end 568 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.mm ('k') | chrome/browser/ui/cocoa/gradient_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698