2 * Implementation of IShellBrowser interface
4 * Copyright 2011 Piotr Caban for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
30 static inline ShellBrowser *impl_from_IShellBrowser(IShellBrowser *iface)
32 return CONTAINING_RECORD(iface, ShellBrowser, IShellBrowser_iface);
35 static HRESULT WINAPI ShellBrowser_QueryInterface(IShellBrowser* iface, REFIID riid, void **ppv)
37 ShellBrowser *This = impl_from_IShellBrowser(iface);
39 if(IsEqualGUID(&IID_IUnknown, riid)) {
40 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
41 *ppv = &This->IShellBrowser_iface;
42 }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
43 TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
44 *ppv = &This->IShellBrowser_iface;
45 }else if(IsEqualGUID(&IID_IShellBrowser, riid)) {
46 TRACE("(%p)->(IID_IShellBrowser %p)\n", This, ppv);
47 *ppv = &This->IShellBrowser_iface;
48 }else if(IsEqualGUID(&IID_IBrowserService, riid)) {
49 TRACE("(%p)->(IID_IBrowserService %p)\n", This, ppv);
50 *ppv = &This->IBrowserService_iface;
51 }else if(IsEqualGUID(&IID_IDocObjectService, riid)) {
52 TRACE("(%p)->(IID_IDocObjectService %p)\n", This, ppv);
53 *ppv = &This->IDocObjectService_iface;
55 FIXME("%p %s %p\n", This, debugstr_guid(riid), ppv);
60 IUnknown_AddRef((IUnknown*)*ppv);
64 static ULONG WINAPI ShellBrowser_AddRef(
67 ShellBrowser *This = impl_from_IShellBrowser(iface);
68 LONG ref = InterlockedIncrement(&This->ref);
70 TRACE("(%p) ref=%d\n", This, ref);
75 static ULONG WINAPI ShellBrowser_Release(IShellBrowser* iface)
77 ShellBrowser *This = impl_from_IShellBrowser(iface);
78 LONG ref = InterlockedDecrement(&This->ref);
80 TRACE("(%p) ref=%d\n", This, ref);
83 assert(!This->doc_host);
90 static HRESULT WINAPI ShellBrowser_GetWindow(
94 ShellBrowser *This = impl_from_IShellBrowser(iface);
95 FIXME("%p %p\n", This, phwnd);
99 static HRESULT WINAPI ShellBrowser_ContextSensitiveHelp(
100 IShellBrowser* iface,
103 ShellBrowser *This = impl_from_IShellBrowser(iface);
104 FIXME("%p %d\n", This, fEnterMode);
108 static HRESULT WINAPI ShellBrowser_InsertMenusSB(
109 IShellBrowser* iface,
111 LPOLEMENUGROUPWIDTHS lpMenuWidths)
113 ShellBrowser *This = impl_from_IShellBrowser(iface);
114 FIXME("%p %p %p\n", This, hmenuShared, lpMenuWidths);
118 static HRESULT WINAPI ShellBrowser_SetMenuSB(
119 IShellBrowser* iface,
121 HOLEMENU holemenuReserved,
122 HWND hwndActiveObject)
124 ShellBrowser *This = impl_from_IShellBrowser(iface);
125 FIXME("%p %p %p %p\n", This, hmenuShared, holemenuReserved, hwndActiveObject);
129 static HRESULT WINAPI ShellBrowser_RemoveMenusSB(
130 IShellBrowser* iface,
133 ShellBrowser *This = impl_from_IShellBrowser(iface);
134 FIXME("%p %p\n", This, hmenuShared);
138 static HRESULT WINAPI ShellBrowser_SetStatusTextSB(
139 IShellBrowser* iface,
140 LPCOLESTR pszStatusText)
142 ShellBrowser *This = impl_from_IShellBrowser(iface);
143 FIXME("%p %s\n", This, debugstr_w(pszStatusText));
147 static HRESULT WINAPI ShellBrowser_EnableModelessSB(
148 IShellBrowser* iface,
151 ShellBrowser *This = impl_from_IShellBrowser(iface);
152 FIXME("%p %d\n", This, fEnable);
156 static HRESULT WINAPI ShellBrowser_TranslateAcceleratorSB(
157 IShellBrowser* iface,
161 ShellBrowser *This = impl_from_IShellBrowser(iface);
162 FIXME("%p %p %d\n", This, pmsg, (int)wID);
166 static HRESULT WINAPI ShellBrowser_BrowseObject(
167 IShellBrowser* iface,
171 ShellBrowser *This = impl_from_IShellBrowser(iface);
172 FIXME("%p %p %u\n", This, pidl, wFlags);
176 static HRESULT WINAPI ShellBrowser_GetViewStateStream(
177 IShellBrowser* iface,
181 ShellBrowser *This = impl_from_IShellBrowser(iface);
182 FIXME("%p %x %p\n", This, grfMode, ppStrm);
186 static HRESULT WINAPI ShellBrowser_GetControlWindow(
187 IShellBrowser* iface,
191 ShellBrowser *This = impl_from_IShellBrowser(iface);
192 FIXME("%p %u %p\n", This, id, phwnd);
196 static HRESULT WINAPI ShellBrowser_SendControlMsg(
197 IShellBrowser* iface,
204 ShellBrowser *This = impl_from_IShellBrowser(iface);
205 FIXME("%p %u %u %p\n", This, id, uMsg, pret);
209 static HRESULT WINAPI ShellBrowser_QueryActiveShellView(
210 IShellBrowser* iface,
213 ShellBrowser *This = impl_from_IShellBrowser(iface);
214 FIXME("%p %p\n", This, ppshv);
218 static HRESULT WINAPI ShellBrowser_OnViewWindowActive(
219 IShellBrowser* iface,
222 ShellBrowser *This = impl_from_IShellBrowser(iface);
223 FIXME("%p %p\n", This, pshv);
227 static HRESULT WINAPI ShellBrowser_SetToolbarItems(
228 IShellBrowser* iface,
229 LPTBBUTTONSB lpButtons,
233 ShellBrowser *This = impl_from_IShellBrowser(iface);
234 FIXME("%p %p %u %u\n", This, lpButtons, nButtons, uFlags);
238 static const IShellBrowserVtbl ShellBrowserVtbl = {
239 ShellBrowser_QueryInterface,
241 ShellBrowser_Release,
242 ShellBrowser_GetWindow,
243 ShellBrowser_ContextSensitiveHelp,
244 ShellBrowser_InsertMenusSB,
245 ShellBrowser_SetMenuSB,
246 ShellBrowser_RemoveMenusSB,
247 ShellBrowser_SetStatusTextSB,
248 ShellBrowser_EnableModelessSB,
249 ShellBrowser_TranslateAcceleratorSB,
250 ShellBrowser_BrowseObject,
251 ShellBrowser_GetViewStateStream,
252 ShellBrowser_GetControlWindow,
253 ShellBrowser_SendControlMsg,
254 ShellBrowser_QueryActiveShellView,
255 ShellBrowser_OnViewWindowActive,
256 ShellBrowser_SetToolbarItems
259 static inline ShellBrowser *impl_from_IBrowserService(IBrowserService *iface)
261 return CONTAINING_RECORD(iface, ShellBrowser, IBrowserService_iface);
264 static HRESULT WINAPI BrowserService_QueryInterface(
265 IBrowserService* iface,
269 ShellBrowser *This = impl_from_IBrowserService(iface);
270 return IShellBrowser_QueryInterface(&This->IShellBrowser_iface, riid, ppvObject);
273 static ULONG WINAPI BrowserService_AddRef(
274 IBrowserService *iface)
276 ShellBrowser *This = impl_from_IBrowserService(iface);
277 return IShellBrowser_AddRef(&This->IShellBrowser_iface);
280 static ULONG WINAPI BrowserService_Release(
281 IBrowserService* iface)
283 ShellBrowser *This = impl_from_IBrowserService(iface);
284 return IShellBrowser_Release(&This->IShellBrowser_iface);
287 static HRESULT WINAPI BrowserService_GetParentSite(
288 IBrowserService* iface,
289 IOleInPlaceSite **ppipsite)
291 ShellBrowser *This = impl_from_IBrowserService(iface);
292 FIXME("%p %p\n", This, ppipsite);
296 static HRESULT WINAPI BrowserService_SetTitle(
297 IBrowserService* iface,
301 ShellBrowser *This = impl_from_IBrowserService(iface);
302 FIXME("%p %p %s\n", This, psv, debugstr_w(pszName));
306 static HRESULT WINAPI BrowserService_GetTitle(
307 IBrowserService* iface,
312 ShellBrowser *This = impl_from_IBrowserService(iface);
313 FIXME("%p %p %p %d\n", This, psv, pszName, cchName);
317 static HRESULT WINAPI BrowserService_GetOleObject(
318 IBrowserService* iface,
321 ShellBrowser *This = impl_from_IBrowserService(iface);
322 FIXME("%p %p\n", This, ppobjv);
326 static HRESULT WINAPI BrowserService_GetTravelLog(
327 IBrowserService* iface,
330 ShellBrowser *This = impl_from_IBrowserService(iface);
331 FIXME("%p %p\n", This, pptl);
335 static HRESULT WINAPI BrowserService_ShowControlWindow(
336 IBrowserService* iface,
340 ShellBrowser *This = impl_from_IBrowserService(iface);
341 FIXME("%p %u %d\n", This, id, fShow);
345 static HRESULT WINAPI BrowserService_IsControlWindowShown(
346 IBrowserService* iface,
350 ShellBrowser *This = impl_from_IBrowserService(iface);
351 FIXME("%p %u %p\n", This, id, pfShown);
355 static HRESULT WINAPI BrowserService_IEGetDisplayName(
356 IBrowserService* iface,
357 PCIDLIST_ABSOLUTE pidl,
361 ShellBrowser *This = impl_from_IBrowserService(iface);
362 FIXME("%p %p %p %u\n", This, pidl, pwszName, uFlags);
366 static HRESULT WINAPI BrowserService_IEParseDisplayName(
367 IBrowserService* iface,
370 PIDLIST_ABSOLUTE *ppidlOut)
372 ShellBrowser *This = impl_from_IBrowserService(iface);
373 FIXME("%p %u %s %p\n", This, uiCP, debugstr_w(pwszPath), ppidlOut);
377 static HRESULT WINAPI BrowserService_DisplayParseError(
378 IBrowserService* iface,
382 ShellBrowser *This = impl_from_IBrowserService(iface);
383 FIXME("%p %x %s\n", This, hres, debugstr_w(pwszPath));
387 static HRESULT WINAPI BrowserService_NavigateToPidl(
388 IBrowserService* iface,
389 PCIDLIST_ABSOLUTE pidl,
392 ShellBrowser *This = impl_from_IBrowserService(iface);
393 FIXME("%p %p %d\n", This, pidl, grfHLNF);
397 static HRESULT WINAPI BrowserService_SetNavigateState(
398 IBrowserService* iface,
401 ShellBrowser *This = impl_from_IBrowserService(iface);
402 FIXME("%p %d\n", This, bnstate);
406 static HRESULT WINAPI BrowserService_GetNavigateState(
407 IBrowserService* iface,
410 ShellBrowser *This = impl_from_IBrowserService(iface);
411 FIXME("%p %p\n", This, pbnstate);
415 static HRESULT WINAPI BrowserService_NotifyRedirect(
416 IBrowserService* iface,
418 PCIDLIST_ABSOLUTE pidl,
421 ShellBrowser *This = impl_from_IBrowserService(iface);
422 FIXME("%p %p %p %p\n", This, psv, pidl, pfDidBrowse);
426 static HRESULT WINAPI BrowserService_UpdateWindowList(
427 IBrowserService* iface)
429 ShellBrowser *This = impl_from_IBrowserService(iface);
434 static HRESULT WINAPI BrowserService_UpdateBackForwardState(
435 IBrowserService* iface)
437 ShellBrowser *This = impl_from_IBrowserService(iface);
442 static HRESULT WINAPI BrowserService_SetFlags(
443 IBrowserService* iface,
447 ShellBrowser *This = impl_from_IBrowserService(iface);
448 FIXME("%p %x %x\n", This, dwFlags, dwFlagMask);
452 static HRESULT WINAPI BrowserService_GetFlags(
453 IBrowserService* iface,
456 ShellBrowser *This = impl_from_IBrowserService(iface);
457 FIXME("%p %p\n", This, pdwFlags);
461 static HRESULT WINAPI BrowserService_CanNavigateNow(
462 IBrowserService* iface)
464 ShellBrowser *This = impl_from_IBrowserService(iface);
469 static HRESULT WINAPI BrowserService_GetPidl(
470 IBrowserService* iface,
471 PIDLIST_ABSOLUTE *ppidl)
473 ShellBrowser *This = impl_from_IBrowserService(iface);
474 FIXME("%p %p\n", This, ppidl);
478 static HRESULT WINAPI BrowserService_SetReferrer(
479 IBrowserService* iface,
480 PCIDLIST_ABSOLUTE pidl)
482 ShellBrowser *This = impl_from_IBrowserService(iface);
483 FIXME("%p %p\n", This, pidl);
487 static DWORD WINAPI BrowserService_GetBrowserIndex(
488 IBrowserService* iface)
490 ShellBrowser *This = impl_from_IBrowserService(iface);
495 static HRESULT WINAPI BrowserService_GetBrowserByIndex(
496 IBrowserService* iface,
500 ShellBrowser *This = impl_from_IBrowserService(iface);
501 FIXME("%p %x %p\n", This, dwID, ppunk);
505 static HRESULT WINAPI BrowserService_GetHistoryObject(
506 IBrowserService* iface,
511 ShellBrowser *This = impl_from_IBrowserService(iface);
512 FIXME("%p %p %p %p\n", This, ppole, pstm, ppbc);
516 static HRESULT WINAPI BrowserService_SetHistoryObject(
517 IBrowserService* iface,
521 ShellBrowser *This = impl_from_IBrowserService(iface);
522 FIXME("%p %p %d\n", This, pole, fIsLocalAnchor);
526 static HRESULT WINAPI BrowserService_CacheOLEServer(
527 IBrowserService* iface,
530 ShellBrowser *This = impl_from_IBrowserService(iface);
531 FIXME("%p %p\n", This, pole);
535 static HRESULT WINAPI BrowserService_GetSetCodePage(
536 IBrowserService* iface,
540 ShellBrowser *This = impl_from_IBrowserService(iface);
541 FIXME("%p %p %p\n", This, pvarIn, pvarOut);
545 static HRESULT WINAPI BrowserService_OnHttpEquiv(
546 IBrowserService* iface,
552 ShellBrowser *This = impl_from_IBrowserService(iface);
553 FIXME("%p %p %d %p %p\n", This, psv, fDone, pvarargIn, pvarargOut);
557 static HRESULT WINAPI BrowserService_GetPalette(
558 IBrowserService* iface,
561 ShellBrowser *This = impl_from_IBrowserService(iface);
562 FIXME("%p %p\n", This, hpal);
566 static HRESULT WINAPI BrowserService_RegisterWindow(
567 IBrowserService* iface,
571 ShellBrowser *This = impl_from_IBrowserService(iface);
572 FIXME("%p %d %d\n", This, fForceRegister, swc);
576 static const IBrowserServiceVtbl BrowserServiceVtbl = {
577 BrowserService_QueryInterface,
578 BrowserService_AddRef,
579 BrowserService_Release,
580 BrowserService_GetParentSite,
581 BrowserService_SetTitle,
582 BrowserService_GetTitle,
583 BrowserService_GetOleObject,
584 BrowserService_GetTravelLog,
585 BrowserService_ShowControlWindow,
586 BrowserService_IsControlWindowShown,
587 BrowserService_IEGetDisplayName,
588 BrowserService_IEParseDisplayName,
589 BrowserService_DisplayParseError,
590 BrowserService_NavigateToPidl,
591 BrowserService_SetNavigateState,
592 BrowserService_GetNavigateState,
593 BrowserService_NotifyRedirect,
594 BrowserService_UpdateWindowList,
595 BrowserService_UpdateBackForwardState,
596 BrowserService_SetFlags,
597 BrowserService_GetFlags,
598 BrowserService_CanNavigateNow,
599 BrowserService_GetPidl,
600 BrowserService_SetReferrer,
601 BrowserService_GetBrowserIndex,
602 BrowserService_GetBrowserByIndex,
603 BrowserService_GetHistoryObject,
604 BrowserService_SetHistoryObject,
605 BrowserService_CacheOLEServer,
606 BrowserService_GetSetCodePage,
607 BrowserService_OnHttpEquiv,
608 BrowserService_GetPalette,
609 BrowserService_RegisterWindow
612 static inline ShellBrowser *impl_from_IDocObjectService(IDocObjectService *iface)
614 return CONTAINING_RECORD(iface, ShellBrowser, IDocObjectService_iface);
617 static HRESULT WINAPI DocObjectService_QueryInterface(
618 IDocObjectService* iface,
622 ShellBrowser *This = impl_from_IDocObjectService(iface);
623 return IShellBrowser_QueryInterface(&This->IShellBrowser_iface, riid, ppvObject);
626 static ULONG WINAPI DocObjectService_AddRef(
627 IDocObjectService* iface)
629 ShellBrowser *This = impl_from_IDocObjectService(iface);
630 return IShellBrowser_AddRef(&This->IShellBrowser_iface);
633 static ULONG WINAPI DocObjectService_Release(
634 IDocObjectService* iface)
636 ShellBrowser *This = impl_from_IDocObjectService(iface);
637 return IShellBrowser_Release(&This->IShellBrowser_iface);
640 static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(
641 IDocObjectService* iface,
642 IDispatch *pDispatch,
645 LPCWSTR lpszFrameName,
652 ShellBrowser *This = impl_from_IDocObjectService(iface);
653 VARIANT var_url, var_flags, var_frame_name, var_post_data, var_post_data2, var_headers;
654 VARIANTARG params[7];
655 DISPPARAMS dp = {params, NULL, 7, 0};
656 VARIANT_BOOL cancel = VARIANT_FALSE;
657 SAFEARRAY *post_data;
659 TRACE("%p %p %s %x %s %p %d %s %d %p\n", This, pDispatch, debugstr_w(lpszUrl),
660 dwFlags, debugstr_w(lpszFrameName), pPostData, cbPostData,
661 debugstr_w(lpszHeaders), fPlayNavSound, pfCancel);
664 post_data = SafeArrayCreateVector(VT_UI1, 0, cbPostData);
665 memcpy(post_data->pvData, pPostData, cbPostData);
667 return E_OUTOFMEMORY;
672 V_VT(params) = VT_BOOL|VT_BYREF;
673 V_BOOLREF(params) = &cancel;
675 V_VT(params+1) = (VT_BYREF|VT_VARIANT);
676 V_VARIANTREF(params+1) = &var_headers;
677 V_VT(&var_headers) = VT_BSTR;
678 V_BSTR(&var_headers) = lpszHeaders ? SysAllocString(lpszHeaders) : NULL;
680 V_VT(params+2) = (VT_BYREF|VT_VARIANT);
681 V_VARIANTREF(params+2) = &var_post_data2;
682 V_VT(&var_post_data2) = (VT_BYREF|VT_VARIANT);
683 V_VARIANTREF(&var_post_data2) = &var_post_data;
686 V_VT(&var_post_data) = VT_UI1|VT_ARRAY;
687 V_ARRAY(&var_post_data) = post_data;
689 V_VT(&var_post_data) = VT_EMPTY;
692 V_VT(params+3) = (VT_BYREF|VT_VARIANT);
693 V_VARIANTREF(params+3) = &var_frame_name;
694 V_VT(&var_frame_name) = VT_BSTR;
695 V_BSTR(&var_frame_name) = NULL;
697 V_VT(params+4) = (VT_BYREF|VT_VARIANT);
698 V_VARIANTREF(params+4) = &var_flags;
699 V_VT(&var_flags) = VT_I4;
700 V_I4(&var_flags) = 0;
702 V_VT(params+5) = (VT_BYREF|VT_VARIANT);
703 V_VARIANTREF(params+5) = &var_url;
704 V_VT(&var_url) = VT_BSTR;
705 V_BSTR(&var_url) = SysAllocString(lpszUrl);
707 V_VT(params+6) = (VT_DISPATCH);
708 V_DISPATCH(params+6) = This->doc_host->disp;
711 call_sink(This->doc_host->cps.wbe2, DISPID_BEFORENAVIGATE2, &dp);
714 SysFreeString(V_BSTR(&var_url));
715 SysFreeString(V_BSTR(&var_headers));
716 SafeArrayDestroy(post_data);
718 *pfCancel = !!cancel;
722 static HRESULT WINAPI DocObjectService_FireNavigateComplete2(
723 IDocObjectService* iface,
724 IHTMLWindow2 *pHTMLWindow2,
727 ShellBrowser *This = impl_from_IDocObjectService(iface);
728 IHTMLPrivateWindow *priv_window;
729 VARIANTARG params[2];
730 DISPPARAMS dp = {params, NULL, 2, 0};
735 TRACE("%p %p %x\n", This, pHTMLWindow2, dwFlags);
737 hres = IHTMLWindow2_QueryInterface(pHTMLWindow2, &IID_IHTMLPrivateWindow, (void**)&priv_window);
741 hres = IHTMLPrivateWindow_GetAddressBarUrl(priv_window, &url);
742 IHTMLPrivateWindow_Release(priv_window);
746 TRACE("got URL %s\n", debugstr_w(url));
747 set_dochost_url(This->doc_host, url);
749 V_VT(params) = (VT_BYREF|VT_VARIANT);
750 V_BYREF(params) = &url;
752 V_VT(params+1) = VT_DISPATCH;
753 V_DISPATCH(params+1) = This->doc_host->disp;
755 V_VT(&url_var) = VT_BSTR;
756 V_BSTR(&url_var) = url;
759 call_sink(This->doc_host->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dp);
764 This->doc_host->busy = VARIANT_FALSE;
768 static HRESULT WINAPI DocObjectService_FireDownloadBegin(
769 IDocObjectService* iface)
771 ShellBrowser *This = impl_from_IDocObjectService(iface);
776 static HRESULT WINAPI DocObjectService_FireDownloadComplete(
777 IDocObjectService* iface)
779 ShellBrowser *This = impl_from_IDocObjectService(iface);
784 static HRESULT WINAPI DocObjectService_FireDocumentComplete(
785 IDocObjectService* iface,
786 IHTMLWindow2 *pHTMLWindow,
789 ShellBrowser *This = impl_from_IDocObjectService(iface);
790 IHTMLPrivateWindow *priv_window;
791 VARIANTARG params[2];
792 DISPPARAMS dp = {params, NULL, 2, 0};
797 TRACE("%p %p %x\n", This, pHTMLWindow, dwFlags);
799 hres = IHTMLWindow2_QueryInterface(pHTMLWindow, &IID_IHTMLPrivateWindow, (void**)&priv_window);
803 hres = IHTMLPrivateWindow_GetAddressBarUrl(priv_window, &url);
804 IHTMLPrivateWindow_Release(priv_window);
808 TRACE("got URL %s\n", debugstr_w(url));
810 V_VT(params) = (VT_BYREF|VT_VARIANT);
811 V_BYREF(params) = &url;
813 V_VT(params+1) = VT_DISPATCH;
814 V_DISPATCH(params+1) = This->doc_host->disp;
816 V_VT(&url_var) = VT_BSTR;
817 V_BSTR(&url_var) = url;
820 call_sink(This->doc_host->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dp);
824 This->doc_host->busy = VARIANT_FALSE;
828 static HRESULT WINAPI DocObjectService_UpdateDesktopComponent(
829 IDocObjectService* iface,
830 IHTMLWindow2 *pHTMLWindow)
832 ShellBrowser *This = impl_from_IDocObjectService(iface);
833 FIXME("%p %p\n", This, pHTMLWindow);
837 static HRESULT WINAPI DocObjectService_GetPendingUrl(
838 IDocObjectService* iface,
839 BSTR *pbstrPendingUrl)
841 ShellBrowser *This = impl_from_IDocObjectService(iface);
842 FIXME("%p %p\n", This, pbstrPendingUrl);
846 static HRESULT WINAPI DocObjectService_ActiveElementChanged(
847 IDocObjectService* iface,
848 IHTMLElement *pHTMLElement)
850 ShellBrowser *This = impl_from_IDocObjectService(iface);
851 FIXME("%p %p\n", This, pHTMLElement);
855 static HRESULT WINAPI DocObjectService_GetUrlSearchComponent(
856 IDocObjectService* iface,
859 ShellBrowser *This = impl_from_IDocObjectService(iface);
860 FIXME("%p %p\n", This, pbstrSearch);
864 static HRESULT WINAPI DocObjectService_IsErrorUrl(
865 IDocObjectService* iface,
869 ShellBrowser *This = impl_from_IDocObjectService(iface);
870 FIXME("%p %s %p\n", This, debugstr_w(lpszUrl), pfIsError);
876 static const IDocObjectServiceVtbl DocObjectServiceVtbl = {
877 DocObjectService_QueryInterface,
878 DocObjectService_AddRef,
879 DocObjectService_Release,
880 DocObjectService_FireBeforeNavigate2,
881 DocObjectService_FireNavigateComplete2,
882 DocObjectService_FireDownloadBegin,
883 DocObjectService_FireDownloadComplete,
884 DocObjectService_FireDocumentComplete,
885 DocObjectService_UpdateDesktopComponent,
886 DocObjectService_GetPendingUrl,
887 DocObjectService_ActiveElementChanged,
888 DocObjectService_GetUrlSearchComponent,
889 DocObjectService_IsErrorUrl
892 HRESULT create_browser_service(DocHost *doc_host, ShellBrowser **ret)
896 sb = heap_alloc(sizeof(ShellBrowser));
898 return E_OUTOFMEMORY;
900 sb->IShellBrowser_iface.lpVtbl = &ShellBrowserVtbl;
901 sb->IBrowserService_iface.lpVtbl = &BrowserServiceVtbl;
902 sb->IDocObjectService_iface.lpVtbl = &DocObjectServiceVtbl;
905 sb->doc_host = doc_host;
911 void detach_browser_service(ShellBrowser *sb)
914 IShellBrowser_Release(&sb->IShellBrowser_iface);