void ViewLogic::checkAsyncMessageFromBundle(const char* name, const char* body)
{
- LogDebug("checkAsyncMessageFromBundle called");
Assert(name);
-
- LogDebug("received : " << name);
+ _D("received : %s", name);
if (!strcmp(name, Message::ToUIProcess::BLOCKED_URL)) {
// Currently WebProcess informs obly about blocked
Ewk_Cookie_Manager* cookieManager =
ewk_context_cookie_manager_get(m_ewkContext);
if (!cookieManager) {
- LogError("Fail to get cookieManager");
+ _E("Fail to get cookieManager");
return;
}
ewk_cookie_manager_cookies_clear(cookieManager);
- }
- else if (!strcmp(name, IPCMessageSupport::TIZEN_CHANGE_USERAGENT))
- {
+ } else if (!strcmp(name, IPCMessageSupport::TIZEN_CHANGE_USERAGENT)) {
std::string msgBody = (body) ? (body) : "";
std::string strId = msgBody.substr(0, msgBody.find_first_of('_'));
std::string strBody = msgBody.substr(msgBody.find_first_of('_')+1);
-
- LogDebug("Id: " << strId << ", Body:" << strBody);
+ _D("Id: %s , Body %s", strId.c_str(), strBody.c_str());
ewk_view_user_agent_set(m_currentEwkView, strBody.c_str());
+ _D("get UA: %s", ewk_view_user_agent_get(m_currentEwkView));
- LogDebug("get UA: " << ewk_view_user_agent_get(m_currentEwkView));
-
- IPCMessageSupport::replyAsyncMessageToWebProcess(m_ewkContext, atoi(strId.c_str()), "success");
-
+ IPCMessageSupport::replyAsyncMessageToWebProcess(m_ewkContext,
+ atoi(strId.c_str()),
+ "success");
return;
- }
- else if (!strcmp(name, IPCMessageSupport::TIZEN_DELETE_ALL_COOKIES))
- {
+ } else if (!strcmp(name, IPCMessageSupport::TIZEN_DELETE_ALL_COOKIES)) {
std::string msgBody = (body) ? (body) : "";
-
std::string strId = msgBody.substr(0, msgBody.find_first_of('_'));
std::string strBody = msgBody.substr(msgBody.find_first_of('_')+1);
- Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(m_ewkContext);
-
- if (!cookieManager)
- {
- LogError("Fail to get cookieManager");
- IPCMessageSupport::replyAsyncMessageToWebProcess(m_ewkContext, atoi(strId.c_str()), "error");
-
+ Ewk_Cookie_Manager* cookieManager =
+ ewk_context_cookie_manager_get(m_ewkContext);
+ if (!cookieManager) {
+ _E("Fail to get cookieManager");
+ IPCMessageSupport::replyAsyncMessageToWebProcess(
+ m_ewkContext,
+ atoi(strId.c_str()),
+ "error");
return;
}
ewk_cookie_manager_cookies_clear(cookieManager);
-
- IPCMessageSupport::replyAsyncMessageToWebProcess(m_ewkContext, atoi(strId.c_str()), "success");
-
+ IPCMessageSupport::replyAsyncMessageToWebProcess(m_ewkContext,
+ atoi(strId.c_str()),
+ "success");
return;
+ } else if (!strcmp(name, IPCMessageSupport::TIZEN_EXIT) ||
+ !strcmp(name, IPCMessageSupport::TIZEN_HIDE))
+ {
+ bool ret = m_schemeSupport->HandleTizenScheme(name,
+ m_window,
+ m_currentEwkView);
+ if (ret == false) {
+ _E("Fail to handle tizen scheme %s", name);
+ }
+ // Not need to send reply
+ return;
+ } else {
+ _W("Not defined message");
}
}