_WebImpl::~_WebImpl()
{
- _WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->RemoveWeb(reinterpret_cast< int >(this));
-
- _DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
- pManagerImpl->SetDownloadListener(null);
-
- RemoveEventListenerCallback();
ClearCertificateDb();
}
__pWebCore = dynamic_cast< _Web* >(&(GetCore()));
SysTryReturnResult(NID_WEB_CTRL, __pWebCore, E_SYSTEM, "A system error has been occurred. Failed to get web control");
- _WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->AddWeb(reinterpret_cast< int >(this));
-
return E_SUCCESS;
}
r = __pWebCore->InitializeWebNativeNode();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnResult(NID_WEB_CTRL, pControlManager, E_SYSTEM, "Failed to get the ControlManager instance.");
+ OnChangeLayout(pControlManager->GetScreenRotation());
+
r = InitializeSetting();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = _ContainerImpl::OnPreAttachedToMainTree();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->AddWeb(reinterpret_cast< int >(this));
+
+ return E_SUCCESS;
+}
+
+
+result
+_WebImpl::OnDetachingFromMainTree(void)
+{
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->RemoveWeb(reinterpret_cast< int >(this));
+ pWebManager->RemoveActiveWeb(this);
+
+ _DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
+ pManagerImpl->SetDownloadListener(null);
+
+ RemoveEventListenerCallback();
+
return E_SUCCESS;
}