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

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

Issue 10399084: Fix crash in the accessibility code in the shared build. The problem is that the ATL module pointer… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update license header in atl_module.h Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2011 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 UI_BASE_WIN_ATL_MODULE_H_ 5 #ifndef UI_BASE_WIN_ATL_MODULE_H_
dmazzoni 2012/05/18 15:00:28 This needs to be updated
6 #define UI_BASE_WIN_ATL_MODULE_H_ 6 #define UI_BASE_WIN_ATL_MODULE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlcom.h> 10 #include <atlcom.h>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 13
14 namespace ui { 14 namespace ui {
dmazzoni 2012/05/18 15:00:28 This needs to change from ui to base
15 namespace win { 15 namespace win {
16 16
17 // Ensure that we have exactly one ATL module registered. It's safe to 17 // Ensure that we have exactly one ATL module registered. It's safe to
18 // call this more than once. ATL functions will crash if there's no 18 // call this more than once. ATL functions will crash if there's no
19 // ATL module registered, or if you try to register two of them, so 19 // ATL module registered, or if you try to register two of them, so
20 // dynamically registering one if needed makes it much easier for us 20 // dynamically registering one if needed makes it much easier for us
21 // to support different build configurations like multi-dll without 21 // to support different build configurations like multi-dll without
22 // worrying about which side of a module boundary each ATL module object 22 // worrying about which side of a module boundary each ATL module object
23 // belongs on. 23 // belongs on.
24 // 24 //
25 // This function must be implemented in this header file rather than a 25 // This function must be implemented in this header file rather than a
26 // source file so that it's inlined into the module where it's included, 26 // source file so that it's inlined into the module where it's included,
27 // rather than in the "ui" module. 27 // rather than in the "ui" module.
28 static void CreateATLModuleIfNeeded() { 28 static void CreateATLModuleIfNeeded() {
29 if (_pAtlModule == NULL) { 29 if (_pAtlModule == NULL) {
30 // This creates the module and automatically updates _pAtlModule. 30 // This creates the module and automatically updates _pAtlModule.
31 CR_DEFINE_STATIC_LOCAL(CComModule, module, ()); 31 CR_DEFINE_STATIC_LOCAL(CComModule, module, ());
32 } 32 }
33 } 33 }
34 34
35 } // namespace win 35 } // namespace win
36 } // namespace ui 36 } // namespace ui
37 37
38 #endif // UI_BASE_WIN_ATL_MODULE_H_ 38 #endif // UI_BASE_WIN_ATL_MODULE_H_
OLDNEW
« no previous file with comments | « base/win/accessibility_misc_utils.cc ('k') | chrome/browser/accessibility/browser_views_accessibility_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698