OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COM_INITIALIZER_H_ | 5 #ifndef BASE_WIN_SCOPED_COM_INITIALIZER_H_ |
6 #define BASE_WIN_SCOPED_COM_INITIALIZER_H_ | 6 #define BASE_WIN_SCOPED_COM_INITIALIZER_H_ |
7 | 7 |
8 #include <objbase.h> | 8 #include <objbase.h> |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 namespace win { | 15 namespace win { |
16 | 16 |
17 // Initializes COM in the constructor (STA or MTA), and uninitializes COM in the | 17 // Initializes COM in the constructor (STA or MTA), and uninitializes COM in the |
18 // destructor. | 18 // destructor. |
19 // | 19 // |
20 // WARNING: This should only be used once per thread, ideally scoped to a | 20 // WARNING: This should only be used once per thread, ideally scoped to a |
21 // similar lifetime as the thread itself. You should not be using this in | 21 // similar lifetime as the thread itself. You should not be using this in |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 DWORD thread_id_; | 70 DWORD thread_id_; |
71 #endif | 71 #endif |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(ScopedCOMInitializer); | 73 DISALLOW_COPY_AND_ASSIGN(ScopedCOMInitializer); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace win | 76 } // namespace win |
77 } // namespace base | 77 } // namespace base |
78 | 78 |
79 #endif // BASE_WIN_SCOPED_COM_INITIALIZER_H_ | 79 #endif // BASE_WIN_SCOPED_COM_INITIALIZER_H_ |
OLD | NEW |