| Index: chrome/browser/ui/cocoa/styled_text_field_cell.mm
|
| diff --git a/chrome/browser/ui/cocoa/styled_text_field_cell.mm b/chrome/browser/ui/cocoa/styled_text_field_cell.mm
|
| index 387d24302c703af2f90c5e8fe03b851c2e5d9b95..6e3dab0e655c0042f1450dcb158e0c589a644cd5 100644
|
| --- a/chrome/browser/ui/cocoa/styled_text_field_cell.mm
|
| +++ b/chrome/browser/ui/cocoa/styled_text_field_cell.mm
|
| @@ -12,6 +12,7 @@
|
| #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/font.h"
|
| +#include "ui/gfx/scoped_ns_graphics_context_state_mac.h"
|
|
|
| namespace {
|
|
|
| @@ -68,25 +69,6 @@ void FrameRectWithInset(StyledTextFieldCellRoundedFlags roundedFlags,
|
| [path stroke];
|
| }
|
|
|
| -// TODO(shess): Maybe we need a |cocoa_util.h|?
|
| -class ScopedSaveGraphicsState {
|
| - public:
|
| - ScopedSaveGraphicsState()
|
| - : context_([NSGraphicsContext currentContext]) {
|
| - [context_ saveGraphicsState];
|
| - }
|
| - explicit ScopedSaveGraphicsState(NSGraphicsContext* context)
|
| - : context_(context) {
|
| - [context_ saveGraphicsState];
|
| - }
|
| - ~ScopedSaveGraphicsState() {
|
| - [context_ restoreGraphicsState];
|
| - }
|
| -
|
| -private:
|
| - NSGraphicsContext* context_;
|
| -};
|
| -
|
| } // namespace
|
|
|
| @implementation StyledTextFieldCell
|
| @@ -189,7 +171,7 @@ private:
|
| // outer border line on the bottom and right. The clipping change
|
| // will clip the bottom and right edges (and corner).
|
| {
|
| - ScopedSaveGraphicsState state;
|
| + gfx::ScopedNSGraphicsContextState state;
|
| [RectPathWithInset(roundedFlags, frame, lineWidth, radius) addClip];
|
| const NSRect shadowFrame =
|
| NSOffsetRect(frame, halfLineWidth, halfLineWidth);
|
|
|