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

Unified Diff: base/scoped_handle_win.h

Issue 303033: Implements AeroPeek of Windows 7.. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « base/base.gyp ('k') | base/scoped_native_library.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/scoped_handle_win.h
===================================================================
--- base/scoped_handle_win.h (revision 40972)
+++ base/scoped_handle_win.h (working copy)
@@ -186,12 +186,20 @@
DISALLOW_COPY_AND_ASSIGN(ScopedGDIObject);
};
+// An explicit specialization for HICON because we have to call DestroyIcon()
+// instead of DeleteObject() for HICON.
+template<>
+void ScopedGDIObject<HICON>::Close() {
+ if (object_)
+ DestroyIcon(object_);
+}
+
// Typedefs for some common use cases.
typedef ScopedGDIObject<HBITMAP> ScopedBitmap;
typedef ScopedGDIObject<HRGN> ScopedRegion;
typedef ScopedGDIObject<HFONT> ScopedHFONT;
+typedef ScopedGDIObject<HICON> ScopedHICON;
-
// Like ScopedHandle except for HGLOBAL.
template<class T>
class ScopedHGlobal {
« no previous file with comments | « base/base.gyp ('k') | base/scoped_native_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698