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

Unified Diff: base/win/scoped_select_object.h

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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/win/scoped_propvariant.h ('k') | base/win/scoped_variant.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_select_object.h
diff --git a/base/win/scoped_select_object.h b/base/win/scoped_select_object.h
deleted file mode 100644
index 347de798e28804f07f0b47ece83f3758ddf5cc28..0000000000000000000000000000000000000000
--- a/base/win/scoped_select_object.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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 BASE_WIN_SCOPED_SELECT_OBJECT_H_
-#define BASE_WIN_SCOPED_SELECT_OBJECT_H_
-
-#include <windows.h>
-
-#include "base/basictypes.h"
-#include "base/logging.h"
-
-namespace base {
-namespace win {
-
-// Helper class for deselecting object from DC.
-class ScopedSelectObject {
- public:
- ScopedSelectObject(HDC hdc, HGDIOBJ object)
- : hdc_(hdc),
- oldobj_(SelectObject(hdc, object)) {
- DCHECK(hdc_);
- DCHECK(object);
- DCHECK(oldobj_ != NULL && oldobj_ != HGDI_ERROR);
- }
-
- ~ScopedSelectObject() {
- HGDIOBJ object = SelectObject(hdc_, oldobj_);
- DCHECK((GetObjectType(oldobj_) != OBJ_REGION && object != NULL) ||
- (GetObjectType(oldobj_) == OBJ_REGION && object != HGDI_ERROR));
- }
-
- private:
- HDC hdc_;
- HGDIOBJ oldobj_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedSelectObject);
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_SELECT_OBJECT_H_
« no previous file with comments | « base/win/scoped_propvariant.h ('k') | base/win/scoped_variant.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698