Chromium Code Reviews| Index: chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm |
| diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm |
| index ecd68752398300c86fdc5f14fdc5650bf067c349..d718eec153dc75ff690b75632600604f5e46e7bf 100644 |
| --- a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm |
| +++ b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm |
| @@ -8,6 +8,8 @@ |
| #include "base/basictypes.h" |
| #import "chrome/browser/ui/cocoa/view_id_util.h" |
| +#include "grit/theme_resources.h" |
| +#include "ui/base/cocoa/appkit_utils.h" |
| NSString* const kBrowserActionGrippyDragStartedNotification = |
| @"BrowserActionGrippyDragStartedNotification"; |
| @@ -71,6 +73,15 @@ const CGFloat kMinimumContainerWidth = 3.0; |
| [super dealloc]; |
| } |
| +- (void)drawRect:(NSRect)rect { |
| + [super drawRect:rect]; |
| + if (isHighlighting_) { |
| + ui::NinePartImageIds imageIds = IMAGE_GRID(IDR_DEVELOPER_MODE_HIGHLIGHT); |
|
Devlin
2015/04/16 16:02:38
Avi, is this there a better way of doing this?
Avi (use Gerrit)
2015/04/16 19:05:54
That seems to be how it's done elsewhere.
Devlin
2015/04/16 22:40:59
It's a shame we have to draw the whole background
|
| + ui::DrawNinePartImage( |
| + [self bounds], imageIds, NSCompositeSourceOver, 1.0, true); |
| + } |
| +} |
| + |
| - (void)setTrackingEnabled:(BOOL)enabled { |
| if (enabled) { |
| trackingArea_.reset( |
| @@ -88,6 +99,13 @@ const CGFloat kMinimumContainerWidth = 3.0; |
| } |
| } |
| +- (void)setIsHighlighting:(BOOL)isHighlighting { |
| + if (isHighlighting != isHighlighting_) { |
| + isHighlighting_ = isHighlighting; |
| + [self setNeedsDisplay:YES]; |
| + } |
| +} |
| + |
| - (void)setResizable:(BOOL)resizable { |
| if (resizable == resizable_) |
| return; |