| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |