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
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
#include "Client/Application/ApplicationWindow.h"
|
|
#include "Client/Application/Launcher.h"
|
|
#include "Client/Browser/WebBrowser.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
|
|
#include <new>
|
|
|
|
// OFFSET: 0x00A91990
|
|
// FUNCTION: fn_17167
|
|
CWebBrowser* UIWindowMgr::FindBrowser(HWND window) {
|
|
const auto found = this->browsers.find(window);
|
|
return found == this->browsers.end() ? nullptr : found->second;
|
|
}
|
|
|
|
// OFFSET: 0x00A8F860
|
|
// FUNCTION: fn_17146
|
|
void UIWindowMgr::RemoveBrowser(HWND window) {
|
|
const auto found = this->browsers.find(window);
|
|
if (found != this->browsers.end()) {
|
|
CWebBrowser* browser = found->second;
|
|
if (browser) {
|
|
if (browser == this->specialBrowser) {
|
|
this->specialBrowser = nullptr;
|
|
}
|
|
|
|
delete browser;
|
|
}
|
|
|
|
this->browsers.erase(found);
|
|
return;
|
|
}
|
|
|
|
if (window == this->specialBrowser->host) {
|
|
delete this->specialBrowser;
|
|
this->specialBrowser = nullptr;
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00A8C960
|
|
// FUNCTION: fn_17138
|
|
CWebBrowser* UIWindowMgr::EnsureSpecialBrowser(int width, int height) {
|
|
if (this->specialBrowser) {
|
|
return this->specialBrowser;
|
|
}
|
|
|
|
this->specialBrowser = new (std::nothrow) CWebBrowser();
|
|
if (this->specialBrowser && this->specialBrowser->Create(hWnd, g_instance, width, height)) {
|
|
this->browsers.emplace(this->specialBrowser->host, this->specialBrowser);
|
|
}
|
|
|
|
return this->specialBrowser;
|
|
}
|