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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.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/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 044032b3018ac679002880495b28678b101657ce..356276672b0441df68bf81e37edb7d4385066949 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -63,6 +63,7 @@
#include "grit/locale_settings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
+#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
// ORGANIZATION: This is a big file. It is (in principle) organized as follows
@@ -188,7 +189,7 @@ enum {
}
- (void)drawRect:(NSRect)rect {
- [NSGraphicsContext saveGraphicsState];
+ gfx::ScopedNSGraphicsContextSaveGState scopedGState;
scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow.get() setShadowColor:[NSColor colorWithCalibratedWhite:0.0
@@ -202,7 +203,6 @@ enum {
operation:NSCompositeSourceOver
fraction:1.0
neverFlipped:YES];
- [NSGraphicsContext restoreGraphicsState];
}
- (void)setImage:(NSImage*)image {
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm ('k') | chrome/browser/ui/cocoa/dock_icon.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698