void ViewLogic::titleChangedCallback(
void* data,
- Evas_Object* /*obj*/,
+ Evas_Object* obj,
void* eventInfo)
{
LogDebug("titleChangedCallback called");
if (0 == strlen(title)) {
LogDebug("title data is empty");
+ This->m_currentTitle = std::string();
return;
}
LogDebug("Title = [" << title << "]");
- This->m_schemeSupport->HandleTizenScheme(title,
+ bool ret = This->m_schemeSupport->HandleTizenScheme(
+ title,
This->m_window,
This->m_currentEwkView);
+ // if result is true, this is tizen scheme
+ // and then, title is reset to page's real title
+ if (ret) {
+ std::string script = "document.title = \"";
+ script += This->m_currentTitle;
+ script +="\";";
+ ewk_view_script_execute(obj, script.c_str(), didRunJavaScriptCallback, This);
+ } else {
+ This->m_currentTitle = std::string(title);
+ }
}
void ViewLogic::loadProgressCallback(
WidgetModel* m_model;
std::string m_currentUri;
std::string m_blockedUri;
+ std::string m_currentTitle;
std::string m_theme;
std::string m_startUrl;
WRT::UserDelegatesPtr m_cbs;