[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
/*
|
|
|
|
* ReactOS Explorer
|
|
|
|
*
|
|
|
|
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
Used by the address band to dispatch navigation changes to the main browser object.
|
|
|
|
|
|
|
|
TODO:
|
|
|
|
|
|
|
|
*/
|
2014-01-21 17:55:08 +00:00
|
|
|
|
2011-07-28 15:54:22 +00:00
|
|
|
#include "precomp.h"
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
|
|
|
|
CBandProxy::CBandProxy()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CBandProxy::~CBandProxy()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT CBandProxy::FindBrowserWindow(IUnknown **browser)
|
|
|
|
{
|
2014-12-17 11:35:07 +00:00
|
|
|
IWebBrowser2* webBrowser;
|
|
|
|
HRESULT hResult;
|
2013-04-28 08:42:22 +00:00
|
|
|
|
|
|
|
if (browser == NULL)
|
|
|
|
return E_POINTER;
|
2014-12-17 11:35:07 +00:00
|
|
|
hResult = IUnknown_QueryService(fSite, SID_IWebBrowserApp, IID_PPV_ARG(IWebBrowser2, &webBrowser));
|
2014-06-04 18:08:35 +00:00
|
|
|
if (FAILED_UNEXPECTEDLY(hResult))
|
2013-04-28 08:42:22 +00:00
|
|
|
return hResult;
|
2014-12-17 11:35:07 +00:00
|
|
|
*browser = webBrowser;
|
2013-04-28 08:42:22 +00:00
|
|
|
return S_OK;
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE CBandProxy::SetSite(IUnknown *paramC)
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
fSite = paramC;
|
|
|
|
return S_OK;
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE CBandProxy::CreateNewWindow(long paramC)
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
return E_NOTIMPL;
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE CBandProxy::GetBrowserWindow(IUnknown **paramC)
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
if (paramC == NULL)
|
|
|
|
return E_POINTER;
|
|
|
|
return FindBrowserWindow(paramC);
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE CBandProxy::IsConnected()
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
CComPtr<IUnknown> webBrowser;
|
|
|
|
HRESULT hResult;
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
|
2013-04-28 08:42:22 +00:00
|
|
|
hResult = FindBrowserWindow(&webBrowser);
|
2014-06-04 18:08:35 +00:00
|
|
|
if (FAILED_UNEXPECTEDLY(hResult) || webBrowser.p == NULL)
|
2013-04-28 08:42:22 +00:00
|
|
|
return S_FALSE;
|
|
|
|
return S_OK;
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE CBandProxy::NavigateToPIDL(LPCITEMIDLIST pidl)
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
CComPtr<IOleWindow> oleWindow;
|
|
|
|
CComPtr<IServiceProvider> serviceProvider;
|
|
|
|
CComPtr<IUnknown> webBrowserUnknown;
|
|
|
|
CComPtr<IWebBrowser2> webBrowser;
|
|
|
|
HWND browserWindow;
|
|
|
|
CComVariant args;
|
|
|
|
CComVariant emptyVariant;
|
|
|
|
unsigned int arraySize;
|
|
|
|
HRESULT hResult;
|
|
|
|
|
|
|
|
hResult = FindBrowserWindow(&webBrowserUnknown);
|
2014-06-04 18:08:35 +00:00
|
|
|
if (FAILED_UNEXPECTEDLY(hResult))
|
2013-04-28 08:42:22 +00:00
|
|
|
return hResult;
|
2014-04-28 15:29:38 +00:00
|
|
|
hResult = webBrowserUnknown->QueryInterface(IID_PPV_ARG(IWebBrowser2, &webBrowser));
|
2014-06-04 18:08:35 +00:00
|
|
|
if (FAILED_UNEXPECTEDLY(hResult))
|
2013-04-28 08:42:22 +00:00
|
|
|
return hResult;
|
|
|
|
hResult = webBrowser->put_Visible(TRUE);
|
2014-04-28 15:29:38 +00:00
|
|
|
hResult = webBrowser->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider));
|
2013-04-28 08:42:22 +00:00
|
|
|
if (SUCCEEDED(hResult))
|
|
|
|
{
|
|
|
|
hResult = serviceProvider->QueryService(SID_STopLevelBrowser,
|
2014-04-28 15:29:38 +00:00
|
|
|
IID_PPV_ARG(IOleWindow, &oleWindow));
|
2013-04-28 08:42:22 +00:00
|
|
|
if (SUCCEEDED(hResult))
|
|
|
|
{
|
|
|
|
hResult = oleWindow->GetWindow(&browserWindow);
|
|
|
|
if (IsIconic(browserWindow))
|
|
|
|
ShowWindow(browserWindow, SW_RESTORE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
arraySize = ILGetSize(pidl);
|
|
|
|
V_VT(&args) = VT_ARRAY | VT_UI1;
|
|
|
|
V_ARRAY(&args) = SafeArrayCreateVector(VT_UI1, 0, arraySize);
|
|
|
|
if (V_ARRAY(&args) == NULL)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
memcpy(V_ARRAY(&args)->pvData, pidl, arraySize);
|
|
|
|
hResult = webBrowser->Navigate2(&args, &emptyVariant, &emptyVariant, &emptyVariant, &emptyVariant);
|
2014-06-04 18:08:35 +00:00
|
|
|
if (FAILED_UNEXPECTEDLY(hResult))
|
2013-04-28 08:42:22 +00:00
|
|
|
return hResult;
|
|
|
|
return S_OK;
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE CBandProxy::NavigateToURL(long paramC, long param10)
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
return E_NOTIMPL;
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|