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

Unified Diff: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.mm ('k') | ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm
index ebc8e830f240fc8c4312017dc22bc026ef8d6d00..2e14478e0ed68379996ef4d7906d3154805d049e 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm
@@ -5,11 +5,12 @@
#import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.h"
#include "base/memory/scoped_nsobject.h"
+#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
@implementation WrenchMenuButtonCell
- (void)drawBezelWithFrame:(NSRect)frame inView:(NSView*)controlView {
- [NSGraphicsContext saveGraphicsState];
+ gfx::ScopedNSGraphicsContextSaveGState scopedGState;
// Inset the rect to match the appearance of the layout of interface builder.
// The bounding rect of buttons is actually larger than the display rect shown
@@ -35,8 +36,6 @@
[[NSColor selectedMenuItemColor] set];
NSRectFill(frame);
}
-
- [NSGraphicsContext restoreGraphicsState];
}
- (NSBackgroundStyle)interiorBackgroundStyle {
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.mm ('k') | ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698