| Index: ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h
|
| ===================================================================
|
| --- ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h (revision 95630)
|
| +++ ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h (working copy)
|
| @@ -4,27 +4,23 @@
|
|
|
| #ifndef UI_GFX_SCOPED_NS_GRAPHICS_CONTEXT_SAVE_GSTATE_MAC_H_
|
| #define UI_GFX_SCOPED_NS_GRAPHICS_CONTEXT_SAVE_GSTATE_MAC_H_
|
| -#pragma once
|
|
|
| -#include "base/basictypes.h"
|
| #include "ui/ui_api.h"
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/scoped_nsobject.h"
|
|
|
| -#if defined(__OBJC__)
|
| @class NSGraphicsContext;
|
| -#else
|
| -class NSGraphicsContext;
|
| -#endif
|
|
|
| namespace gfx {
|
|
|
| -// A class to save/restore the state of the current context.
|
| class UI_API ScopedNSGraphicsContextSaveGState {
|
| public:
|
| - ScopedNSGraphicsContextSaveGState();
|
| + // If |context| is nil, it will use the |+currentContext|.
|
| + explicit ScopedNSGraphicsContextSaveGState(NSGraphicsContext* context = nil);
|
| ~ScopedNSGraphicsContextSaveGState();
|
|
|
| private:
|
| - NSGraphicsContext* context_; // weak
|
| + scoped_nsobject<NSGraphicsContext> context_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScopedNSGraphicsContextSaveGState);
|
| };
|
|
|