Index: chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
=================================================================== |
--- chrome/browser/ui/cocoa/extensions/browser_action_button.mm (revision 84308) |
+++ chrome/browser/ui/cocoa/extensions/browser_action_button.mm (working copy) |
@@ -23,6 +23,7 @@ |
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
#include "ui/gfx/canvas_skia_paint.h" |
#include "ui/gfx/rect.h" |
+#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
#include "ui/gfx/size.h" |
NSString* const kBrowserActionButtonUpdatedNotification = |
@@ -309,11 +310,10 @@ |
} |
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { |
- [NSGraphicsContext saveGraphicsState]; |
+ gfx::ScopedNSGraphicsContextSaveGState scopedGState; |
[super drawInteriorWithFrame:cellFrame inView:controlView]; |
cellFrame.origin.y += kBrowserActionBadgeOriginYOffset; |
[self drawBadgeWithinFrame:cellFrame]; |
- [NSGraphicsContext restoreGraphicsState]; |
} |
@end |