rodecomp/Source/Client/Browser/BrowserClientSite.cpp
ragnarok-clanker d842cee831 Maintenance: [forced, user-approved] Collapse the Browser port's adapter structs into the original code (follow-up to 30cdd441). Evid
Batch #10110 by ragnarok-clanker: forced by an admin (0 lower score(s), 40 changed function(s)); checked with 495 compiled unit(s), including every includer of Source/Client/Application/ApplicationActivation.h, Source/Client/Application/Launcher.h, Source/Client/Browser/BrowserClientSite.h, Source/Client/Browser/BrowserPopupDispatch.h, Source/Client/Browser/WebBrowser.h, Source/Client/Browser/WebEventReceiver.h, Source/Client/Mode/CLoginMode.h, Source/Client/Mode/CMode.h, Source/Client/Mode/ModeTooltip.h, Source/UI/Window/UIWindowMgr.h, Source/Client/Browser/BrowserAddressBar.h, Source/Client/Browser/BrowserAddressEdit.h, Source/Client/Browser/BrowserClose.h, Source/Client/Browser/BrowserCreation.h, Source/Client/Browser/BrowserCursor.h, Source/Client/Browser/BrowserFactory.h, Source/Client/Browser/BrowserFrame.h, Source/Client/Browser/BrowserHostWindow.h, Source/Client/Browser/BrowserInputHandoff.h, Source/Client/Browser/BrowserInterface.h, Source/Client/Browser/BrowserMessages.h, Source/Client/Browser/BrowserRegistry.h, Source/Client/Browser/BrowserSiteAttachment.h, Source/Client/Browser/BrowserWindowSizing.h, Source/UI/Window/WindowFrameUpdate.h.
Deletes: Source/Client/Browser/BrowserAddressBar.h, Source/Client/Browser/BrowserAddressEdit.h, Source/Client/Browser/BrowserClose.h, Source/Client/Browser/BrowserCreation.h, Source/Client/Browser/BrowserCursor.h, Source/Client/Browser/BrowserFactory.h, Source/Client/Browser/BrowserFrame.h, Source/Client/Browser/BrowserHostWindow.h, Source/Client/Browser/BrowserInputHandoff.h, Source/Client/Browser/BrowserInterface.h, Source/Client/Browser/BrowserMessages.h, Source/Client/Browser/BrowserRegistry.h, Source/Client/Browser/BrowserSiteAttachment.h, Source/Client/Browser/BrowserWindowSizing.h, Source/UI/Window/WindowFrameUpdate.h
2026-11-02 16:41:37 +00:00

126 lines
3.1 KiB
C++

#include "Client/Browser/BrowserClientSite.h"
// OFFSET: 0x00AB1310
// FUNCTION: fn_17334
BrowserClientSite::BrowserClientSite(HWND window, IUnknown* browser)
: m_window(window), m_browser(browser), m_events(*this), m_inPlace(*this, this->m_window, this->m_browser), m_documentUI(*this),
m_commands(*this) {
this->m_browser->AddRef();
}
struct CCmdTargetEx {
CCmdTargetEx();
virtual ~CCmdTargetEx() = default;
};
// OFFSET: 0x00AB1480
// FUNCTION: fn_17335
CCmdTargetEx::CCmdTargetEx() = default;
struct CIDispatchEx {
CIDispatchEx();
virtual ~CIDispatchEx() = default;
};
// OFFSET: 0x00AB1490
// FUNCTION: fn_17336
CIDispatchEx::CIDispatchEx() = default;
struct CIDocHostUIHandlerEx {
CIDocHostUIHandlerEx();
virtual ~CIDocHostUIHandlerEx() = default;
};
// OFFSET: 0x00AB14A0
// FUNCTION: fn_17337
CIDocHostUIHandlerEx::CIDocHostUIHandlerEx() = default;
struct CIOleInPlaceFrameEx {
CIOleInPlaceFrameEx();
virtual ~CIOleInPlaceFrameEx() = default;
};
// OFFSET: 0x00AB14B0
// FUNCTION: fn_17338
CIOleInPlaceFrameEx::CIOleInPlaceFrameEx() = default;
// OFFSET: 0x00AB14E0
// FUNCTION: fn_17339
BrowserClientSite::~BrowserClientSite() {
IOleObject* object;
if (SUCCEEDED(this->m_browser->QueryInterface(IID_IOleObject, reinterpret_cast<void**>(&object)))) {
object->Close(OLECLOSE_NOSAVE);
object->Release();
}
this->m_browser->Release();
}
// OFFSET: 0x00AB1B20
// FUNCTION: fn_17384
HRESULT STDMETHODCALLTYPE BrowserClientSite::QueryInterface(REFIID iid, void** output) {
if (iid == IID_IUnknown || iid == IID_IOleClientSite) {
*output = static_cast<IOleClientSite*>(this);
} else if (iid == IID_IOleInPlaceSite) {
*output = static_cast<IOleInPlaceSite*>(&this->m_inPlace);
} else if (iid == IID_IDocHostUIHandler) {
*output = static_cast<IDocHostUIHandler*>(&this->m_documentUI);
} else if (iid == IID_IDispatch) {
*output = &this->m_events;
} else if (iid == IID_IOleCommandTarget) {
*output = static_cast<IOleCommandTarget*>(&this->m_commands);
} else {
return E_NOINTERFACE;
}
return S_OK;
}
// OFFSET: 0x00AB1620
// FUNCTION: fn_17345
ULONG STDMETHODCALLTYPE BrowserClientSite::AddRef() {
return 1;
}
// OFFSET: 0x00AB1CB0
// FUNCTION: fn_17391
ULONG STDMETHODCALLTYPE BrowserClientSite::Release() {
return 1;
}
// OFFSET: 0x00AB1D00
// FUNCTION: fn_17396
HRESULT STDMETHODCALLTYPE BrowserClientSite::SaveObject() {
return E_NOTIMPL;
}
// OFFSET: 0x00AB17A0
// FUNCTION: fn_17361
HRESULT STDMETHODCALLTYPE BrowserClientSite::GetMoniker(DWORD, DWORD, IMoniker**) {
return E_NOTIMPL;
}
// OFFSET: 0x00AB1720
// FUNCTION: fn_17356
HRESULT STDMETHODCALLTYPE BrowserClientSite::GetContainer(IOleContainer** container) {
*container = nullptr;
return E_NOINTERFACE;
}
// OFFSET: 0x00AB1D70
// FUNCTION: fn_17403
HRESULT STDMETHODCALLTYPE BrowserClientSite::ShowObject() {
return S_OK;
}
// OFFSET: 0x00AB1A50
// FUNCTION: fn_17376
HRESULT STDMETHODCALLTYPE BrowserClientSite::OnShowWindow(BOOL) {
return E_NOTIMPL;
}
// OFFSET: 0x00AB1CE0
// FUNCTION: fn_17394
HRESULT STDMETHODCALLTYPE BrowserClientSite::RequestNewObjectLayout() {
return E_NOTIMPL;
}