| Index: chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
|
| ===================================================================
|
| --- chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm (revision 84308)
|
| +++ chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm (working copy)
|
| @@ -23,6 +23,7 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/image.h"
|
| +#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
|
|
|
| namespace {
|
|
|
| @@ -338,8 +339,7 @@
|
| gradient_.reset([[NSGradient alloc] initWithColors:color_array]);
|
| }
|
|
|
| - NSGraphicsContext* context = [NSGraphicsContext currentContext];
|
| - [context saveGraphicsState];
|
| + gfx::ScopedNSGraphicsContextSaveGState scopedGState;
|
|
|
| NSRectClip(frame);
|
|
|
| @@ -368,8 +368,6 @@
|
| NSInsetRect(remainder, kTextMarginPadding, kTextMarginPadding);
|
| // .get() needed to fix compiler warning (confusion with NSImageRep).
|
| [animated_text_.get() drawAtPoint:remainder.origin];
|
| -
|
| - [context restoreGraphicsState];
|
| } else {
|
| // No animation, draw the image as normal.
|
| ImageDecoration::DrawInFrame(frame, control_view);
|
|
|