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

Unified Diff: ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h

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: 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
new file mode 100644
index 0000000000000000000000000000000000000000..32b428cadbfa25d23144c21f3cc2f723359dd82a
--- /dev/null
+++ b/ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_SCOPED_NS_GRAPHICS_CONTEXT_SAVE_GSTATE_MAC_H_
+#define UI_GFX_SCOPED_NS_GRAPHICS_CONTEXT_SAVE_GSTATE_MAC_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_nsobject.h"
+
+@class NSGraphicsContext;
+
+namespace gfx {
+
+// What this class does should be self-evident and self-documenting.
+class ScopedNSGraphicsContextSaveGState {
+ public:
+ // If |context| is nil, it will use the |+currentContext|.
+ explicit ScopedNSGraphicsContextSaveGState(NSGraphicsContext* context = nil);
+ ~ScopedNSGraphicsContextSaveGState();
+
+ private:
+ scoped_nsobject<NSGraphicsContext> context_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedNSGraphicsContextSaveGState);
+};
+
+} // namespace gfx
+
+#endif // UI_GFX_SCOPED_NS_GRAPHICS_CONTEXT_SAVE_GSTATE_MAC_H_
« no previous file with comments | « chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm ('k') | ui/gfx/scoped_ns_graphics_context_save_gstate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698