diff options
author | twiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 20:48:29 +0000 |
---|---|---|
committer | twiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 20:48:29 +0000 |
commit | bbd493e26d755bb4740dd11eba1f46a83782ba43 (patch) | |
tree | 6a10d4222014cc2f2b98f960da16501fc7c08d48 /o3d/plugin | |
parent | 21a99ca2af8e66e3d8f8f93788aab966515bf62d (diff) | |
download | chromium_src-bbd493e26d755bb4740dd11eba1f46a83782ba43.zip chromium_src-bbd493e26d755bb4740dd11eba1f46a83782ba43.tar.gz chromium_src-bbd493e26d755bb4740dd11eba1f46a83782ba43.tar.bz2 |
Clone of issue 598075. See: http://codereview.chromium.org/598075
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/593083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
6 files changed, 7 insertions, 55 deletions
diff --git a/o3d/plugin/npapi_host_control/win/np_browser_proxy.cc b/o3d/plugin/npapi_host_control/win/np_browser_proxy.cc index 5dad231..f951460 100644 --- a/o3d/plugin/npapi_host_control/win/np_browser_proxy.cc +++ b/o3d/plugin/npapi_host_control/win/np_browser_proxy.cc @@ -159,8 +159,13 @@ CComPtr<IDispatchEx> NPBrowserProxy::GetDispatchObject(NPObject* np_object) { } // Create a new NPObject proxy, register it for future use and return it. + CComObject<NPObjectProxy>* proxy_instance; + HRESULT hr = CComObject<NPObjectProxy>::CreateInstance(&proxy_instance); + if (FAILED(hr)) + return NULL; + CComPtr<INPObjectProxy> proxy_wrapper; - HRESULT hr = NPObjectProxy::CreateInstance(&proxy_wrapper); + hr = proxy_instance->QueryInterface(&proxy_wrapper); if (SUCCEEDED(hr)) { proxy_wrapper->SetBrowserProxy(this); proxy_wrapper->SetHostedObject(np_object); diff --git a/o3d/plugin/npapi_host_control/win/np_object_proxy.h b/o3d/plugin/npapi_host_control/win/np_object_proxy.h index 3a290a6..8f29d25 100644 --- a/o3d/plugin/npapi_host_control/win/np_object_proxy.h +++ b/o3d/plugin/npapi_host_control/win/np_object_proxy.h @@ -53,7 +53,6 @@ class NPBrowserProxy; // NPObject scripting functionality. class ATL_NO_VTABLE NPObjectProxy : public CComObjectRootEx<CComSingleThreadModel>, - public CComCoClass<NPObjectProxy, &CLSID_NPObjectProxy>, public IDispatchImpl<INPObjectProxy, &IID_INPObjectProxy, &LIBID_npapi_host_controlLib>, public IObjectSafetyImpl<NPObjectProxy, @@ -62,8 +61,6 @@ class ATL_NO_VTABLE NPObjectProxy : NPObjectProxy(); virtual ~NPObjectProxy(); -DECLARE_REGISTRY_RESOURCEID(IDR_NPOBJECTPROXY) - BEGIN_COM_MAP(NPObjectProxy) COM_INTERFACE_ENTRY(INPObjectProxy) COM_INTERFACE_ENTRY(IDispatch) @@ -124,7 +121,4 @@ END_COM_MAP() DISALLOW_COPY_AND_ASSIGN(NPObjectProxy); }; -// Register this COM class with the COM module. -OBJECT_ENTRY_AUTO(__uuidof(NPObjectProxy), NPObjectProxy); - #endif // O3D_PLUGIN_NPAPI_HOST_CONTROL_WIN_NP_OBJECT_PROXY_H_ diff --git a/o3d/plugin/npapi_host_control/win/np_object_proxy.rgs b/o3d/plugin/npapi_host_control/win/np_object_proxy.rgs deleted file mode 100644 index 3660c52..0000000 --- a/o3d/plugin/npapi_host_control/win/np_object_proxy.rgs +++ /dev/null @@ -1,37 +0,0 @@ -HKCU -{ - Software - { - Classes - { - o3d_host.NPObjectProxy.1 = s 'NPObjectProxy Class' - { - CLSID = s '{1D68424D-7A71-4b61-AE5C-56DBCD8B0E53}' - 'Insertable' - } - o3d_host.NPObjectProxy = s 'NPObjectProxy Class' - { - CLSID = s '{1D68424D-7A71-4b61-AE5C-56DBCD8B0E53}' - CurVer = s 'o3d_host.NPObjectProxy.1' - } - NoRemove CLSID - { - ForceRemove {1D68424D-7A71-4b61-AE5C-56DBCD8B0E53} = s 'NPObjectProxy Class' - { - ProgID = s 'o3d_host.NPObjectProxy.1' - VersionIndependentProgID = s 'o3d_host.NPObjectProxy' - ForceRemove 'Programmable' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - val AppID = s '%APPID%' - ForceRemove 'Control' - ForceRemove 'Insertable' - 'TypeLib' = s '{D4F6E31C-E952-48FE-9833-6AE308BD79C6}' - 'Version' = s '1.0' - } - } - } - } -} diff --git a/o3d/plugin/npapi_host_control/win/npapi_host_control.idl b/o3d/plugin/npapi_host_control/win/npapi_host_control.idl index f1f079b..14822c8 100644 --- a/o3d/plugin/npapi_host_control/win/npapi_host_control.idl +++ b/o3d/plugin/npapi_host_control/win/npapi_host_control.idl @@ -89,12 +89,4 @@ library npapi_host_controlLib { [default] interface IHostControl; }; - - [ - uuid(1D68424D-7A71-4b61-AE5C-56DBCD8B0E53), - ] - coclass NPObjectProxy - { - [default] interface INPObjectProxy; - }; }; diff --git a/o3d/plugin/npapi_host_control/win/npapi_host_control.rc b/o3d/plugin/npapi_host_control/win/npapi_host_control.rc index 5eee891..374baab 100644 --- a/o3d/plugin/npapi_host_control/win/npapi_host_control.rc +++ b/o3d/plugin/npapi_host_control/win/npapi_host_control.rc @@ -93,7 +93,6 @@ END IDR_NPAPI_HOST_CONTROL REGISTRY "npapi_host_control.rgs" IDR_HOSTCONTROL REGISTRY "host_control.rgs" -IDR_NPOBJECTPROXY REGISTRY "np_object_proxy.rgs" ///////////////////////////////////////////////////////////////////////////// // diff --git a/o3d/plugin/npapi_host_control/win/resource.h b/o3d/plugin/npapi_host_control/win/resource.h index 010ae5e..4ca98ac 100644 --- a/o3d/plugin/npapi_host_control/win/resource.h +++ b/o3d/plugin/npapi_host_control/win/resource.h @@ -38,8 +38,7 @@ #define IDR_NPAPI_HOST_CONTROL 101 #define IDB_HOSTCONTROL 102 #define IDR_HOSTCONTROL 103 -#define IDB_NPOBJECTPROXY 104 -#define IDR_NPOBJECTPROXY 105 + // Next default values for new objects. |