diff options
author | yosin@chromium.org <yosin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 05:56:32 +0000 |
---|---|---|
committer | yosin@chromium.org <yosin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 05:56:32 +0000 |
commit | 83deae27106077366e8ae894798dd440e514d809 (patch) | |
tree | 1bb290bb82cd92f464975e37c3bfd1e4cac3e1e0 /base/win | |
parent | 9e2a3137641bc104980e13388b6088d3f4a9b52f (diff) | |
download | chromium_src-83deae27106077366e8ae894798dd440e514d809.zip chromium_src-83deae27106077366e8ae894798dd440e514d809.tar.gz chromium_src-83deae27106077366e8ae894798dd440e514d809.tar.bz2 |
* Rename ScopedHDC to ScopedCreateDC
* Use ScopedSelectObject for changed files
BUG=99139
TEST=no user visible change
Review URL: http://codereview.chromium.org/8139022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r-- | base/win/scoped_hdc.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/base/win/scoped_hdc.h b/base/win/scoped_hdc.h index 8b316ca..9e2ea62 100644 --- a/base/win/scoped_hdc.h +++ b/base/win/scoped_hdc.h @@ -35,19 +35,18 @@ class ScopedGetDC { private: HWND hwnd_; HDC hdc_; + DISALLOW_COPY_AND_ASSIGN(ScopedGetDC); }; // Like ScopedHandle but for HDC. Only use this on HDCs returned from -// CreateCompatibleDC. -// TODO(yosin) To eliminate confusion with ScopedGetDC, we should rename -// ScopedHDC to ScopedCreateDC. -class ScopedHDC { +// CreateCompatibleDC, CreateDC and CreateIC. +class ScopedCreateDC { public: - ScopedHDC() : hdc_(NULL) { } - explicit ScopedHDC(HDC h) : hdc_(h) { } + ScopedCreateDC() : hdc_(NULL) { } + explicit ScopedCreateDC(HDC h) : hdc_(h) { } - ~ScopedHDC() { + ~ScopedCreateDC() { Close(); } @@ -73,7 +72,8 @@ class ScopedHDC { } HDC hdc_; - DISALLOW_COPY_AND_ASSIGN(ScopedHDC); + + DISALLOW_COPY_AND_ASSIGN(ScopedCreateDC); }; } // namespace win |