Chromium Code Reviews| Index: ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h |
| diff --git a/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h |
| index 05bf5f660f38e9a58ba5d3b324a52e4db437a13e..e86a767cb75a33155d0bc407119ddd6c6addd25f 100644 |
| --- a/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h |
| +++ b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h |
| @@ -7,21 +7,17 @@ |
|
Mark Mentovai
2011/08/04 23:20:17
Add #pragma once.
Avi (use Gerrit)
2011/08/05 00:18:50
Done.
|
| #include "ui/ui_api.h" |
|
Mark Mentovai
2011/08/04 23:20:17
Sort headers: base < ui.
Avi (use Gerrit)
2011/08/05 00:18:50
Done.
|
| #include "base/basictypes.h" |
| -#include "base/memory/scoped_nsobject.h" |
| @class NSGraphicsContext; |
|
Mark Mentovai
2011/08/04 23:20:17
I would do:
#if defined(__OBJC__)
@class NSGraphi
Avi (use Gerrit)
2011/08/05 00:18:50
Removed; not needed.
|
| namespace gfx { |
| +// A class to save/restore the state of the current context. |
| class UI_API ScopedNSGraphicsContextSaveGState { |
| public: |
| - // If |context| is nil, it will use the |+currentContext|. |
| - explicit ScopedNSGraphicsContextSaveGState(NSGraphicsContext* context = nil); |
| + ScopedNSGraphicsContextSaveGState(); |
| ~ScopedNSGraphicsContextSaveGState(); |
| - private: |
| - scoped_nsobject<NSGraphicsContext> context_; |
|
Robert Sesek
2011/08/04 22:15:44
So if we were to be paranoid, we'd keep a weak ptr
Avi (use Gerrit)
2011/08/04 22:21:03
You mean before the save context and after the res
Robert Sesek
2011/08/04 22:22:13
No, it'd prevent changing the current context with
|
| - |
| DISALLOW_COPY_AND_ASSIGN(ScopedNSGraphicsContextSaveGState); |
|
Mark Mentovai
2011/08/04 23:20:17
This needs to be in a private: section.
Avi (use Gerrit)
2011/08/05 00:18:50
Done.
|
| }; |