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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_action_button.mm

Issue 6904026: Add and use gfx::ScopedNSGraphicsContextState (ui/gfx/scoped_ns_graphics_context_state_mac.h). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/browser_action_button.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
index aaaefb96f451930ab67570fdec3d0e1dd662f98f..4d725261032cc8d2baf55954183a5afd1482ab31 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
@@ -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 @@ class ExtensionImageTrackerBridge : public NotificationObserver,
}
- (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
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_cell.mm ('k') | chrome/browser/ui/cocoa/find_bar/find_bar_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698