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

Side by Side Diff: plugin/npapi_host_control/win/host_control.h

Issue 151096: Made CHostControl use atomic reference counting because it is accessed from S... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009, Google Inc. All rights reserved. 1 // Copyright 2009, Google Inc. All rights reserved.
2 // Portions of this file were adapted from the Mozilla project. 2 // Portions of this file were adapted from the Mozilla project.
3 // See https://developer.mozilla.org/en/ActiveX_Control_for_Hosting_Netscape_Plu g-ins_in_IE 3 // See https://developer.mozilla.org/en/ActiveX_Control_for_Hosting_Netscape_Plu g-ins_in_IE
4 /* ***** BEGIN LICENSE BLOCK ***** 4 /* ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * 6 *
7 * The contents of this file are subject to the Mozilla Public License Version 7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with 8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at 9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/ 10 * http://www.mozilla.org/MPL/
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "base/scoped_ptr.h" 52 #include "base/scoped_ptr.h"
53 53
54 // Directory not included, as this file is auto-generated from the 54 // Directory not included, as this file is auto-generated from the
55 // type library. 55 // type library.
56 #include "npapi_host_control.h" 56 #include "npapi_host_control.h"
57 #include "plugin/npapi_host_control/win/np_browser_proxy.h" 57 #include "plugin/npapi_host_control/win/np_browser_proxy.h"
58 58
59 class NPPluginProxy; 59 class NPPluginProxy;
60 60
61 // Class implementing an ActiveX control for containing NPAPI plugin-objects. 61 // Class implementing an ActiveX control for containing NPAPI plugin-objects.
62 // This needs to be CComMultiThreadModel because these objects are concurrently
63 // AddRefed and Released from StreamOperation threads.
62 class ATL_NO_VTABLE CHostControl 64 class ATL_NO_VTABLE CHostControl
63 : public CComObjectRootEx<CComSingleThreadModel>, 65 : public CComObjectRootEx<CComMultiThreadModel>,
64 public CComCoClass<CHostControl, &CLSID_HostControl>, 66 public CComCoClass<CHostControl, &CLSID_HostControl>,
65 public CComControl<CHostControl>, 67 public CComControl<CHostControl>,
66 // IMPORTANT IMPLEMENTATION NOTE: 68 // IMPORTANT IMPLEMENTATION NOTE:
67 // Pass 0xFFFF to the major and minor versions of the IDispatchImpl 69 // Pass 0xFFFF to the major and minor versions of the IDispatchImpl
68 // for trigger the behaviour in CComTypeInfoHolder::GetTI that forces 70 // for trigger the behaviour in CComTypeInfoHolder::GetTI that forces
69 // the type-library to be loaded from the module, not through the 71 // the type-library to be loaded from the module, not through the
70 // registry. 72 // registry.
71 // Without this behaviour, the plug-in fails to load on Vista with UAC 73 // Without this behaviour, the plug-in fails to load on Vista with UAC
72 // disabled. This is because all processes run at elevated integrity 74 // disabled. This is because all processes run at elevated integrity
73 // with UAC disabled. Because the plug-in is registered as a per-user 75 // with UAC disabled. Because the plug-in is registered as a per-user
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 &LIBID_npapi_host_controlLib, 261 &LIBID_npapi_host_controlLib,
260 0xFFFF, 0xFFFF> DispatchImpl; 262 0xFFFF, 0xFFFF> DispatchImpl;
261 263
262 DISALLOW_COPY_AND_ASSIGN(CHostControl); 264 DISALLOW_COPY_AND_ASSIGN(CHostControl);
263 }; 265 };
264 266
265 // Register this COM class with the COM module. 267 // Register this COM class with the COM module.
266 OBJECT_ENTRY_AUTO(__uuidof(HostControl), CHostControl); 268 OBJECT_ENTRY_AUTO(__uuidof(HostControl), CHostControl);
267 269
268 #endif // O3D_PLUGIN_NPAPI_HOST_CONTROL_WIN_HOST_CONTROL_H_ 270 #endif // O3D_PLUGIN_NPAPI_HOST_CONTROL_WIN_HOST_CONTROL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698