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

Side by Side Diff: base/win/scoped_comptr.h

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_WIN_SCOPED_COMPTR_H_ 5 #ifndef BASE_WIN_SCOPED_COMPTR_H_
6 #define BASE_WIN_SCOPED_COMPTR_H_ 6 #define BASE_WIN_SCOPED_COMPTR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <unknwn.h> 9 #include <unknwn.h>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 13
14 namespace base { 14 namespace base {
15 namespace win { 15 namespace win {
16 16
17 // A fairly minimalistic smart class for COM interface pointers. 17 // A fairly minimalistic smart class for COM interface pointers.
18 // Uses scoped_refptr for the basic smart pointer functionality 18 // Uses scoped_refptr for the basic smart pointer functionality
19 // and adds a few IUnknown specific services. 19 // and adds a few IUnknown specific services.
20 template <class Interface, const IID* interface_id = &__uuidof(Interface)> 20 template <class Interface, const IID* interface_id = &__uuidof(Interface)>
21 class ScopedComPtr : public scoped_refptr<Interface> { 21 class ScopedComPtr : public scoped_refptr<Interface> {
22 public: 22 public:
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 static const IID& iid() { 161 static const IID& iid() {
162 return *interface_id; 162 return *interface_id;
163 } 163 }
164 }; 164 };
165 165
166 } // namespace win 166 } // namespace win
167 } // namespace base 167 } // namespace base
168 168
169 #endif // BASE_WIN_SCOPED_COMPTR_H_ 169 #endif // BASE_WIN_SCOPED_COMPTR_H_
OLDNEW
« base/task.h ('K') | « base/version_unittest.cc ('k') | base/win/scoped_comptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698