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

Unified Diff: chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.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/location_bar/instant_opt_in_view.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.mm b/chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.mm
index 06ca79d0eb0b4900a16641b106d61ef4d159403e..bb1631fd59aabf84bdbb398e36f15dc1c9259166 100644
--- a/chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.mm
+++ b/chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.mm
@@ -6,6 +6,7 @@
#import "chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.h"
#import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
+#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
namespace {
// How to round off the popup's corners. Goal is to match star and go
@@ -30,7 +31,7 @@ const CGFloat kHorizontalLineInset = 2;
bottomLeftCornerRadius:kPopupRoundingRadius
bottomRightCornerRadius:kPopupRoundingRadius];
- [NSGraphicsContext saveGraphicsState];
+ gfx::ScopedNSGraphicsContextSaveGState scopedGState;
[path addClip];
// Background is white.
@@ -47,8 +48,6 @@ const CGFloat kHorizontalLineInset = 2;
[[NSColor lightGrayColor] set];
NSRectFill(NSMakeRect(minX, lineY, maxX - minX, 1));
-
- [NSGraphicsContext restoreGraphicsState];
}
@end
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm ('k') | chrome/browser/ui/cocoa/styled_text_field_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698