const int ORIENTATION_LANDSCAPE_ANGLE = 270;
const int ORIENTATION_PORTAIT_ANGLE = 0;
+const int W3C_SCREEN_ORI_PORTRAIT_PRIMARY = 0;
+const int W3C_SCREEN_ORI_LANDSCAPE_PRIMARY = 90;
+
static Eina_Bool exitAppIdlerCallback(void* /*data*/)
{
// webapp termination
ewk_shutdown();
elm_exit();
- return ECORE_CALLBACK_CANCEL;}
-
+ return ECORE_CALLBACK_CANCEL;
+}
} // namespace
bool SchemeSupport::HandleUri(
- const char* uri,
- ViewModule::SchemeActionMap::NavigationContext context)
+ const char* uri,
+ ViewModule::SchemeActionMap::NavigationContext context)
{
return ViewModule::SchemeActionMap::HandleUri(uri,
context,
{
LogInfo("Tizen scheme: " << uri << " orientation landscape");
elm_win_rotation_with_resize_set(window, ORIENTATION_LANDSCAPE_ANGLE);
+ ewk_view_orientation_send(wkView, W3C_SCREEN_ORI_LANDSCAPE_PRIMARY);
return true;
} else if (strncmp(uri,
TIZEN_ORIENTATION_PORTAIT,
{
LogInfo("Tizen scheme: " << uri << " orientation portait");
elm_win_rotation_with_resize_set(window, ORIENTATION_PORTAIT_ANGLE);
+ ewk_view_orientation_send(wkView, W3C_SCREEN_ORI_PORTRAIT_PRIMARY);
return true;
} else if (strncmp(uri,
TIZEN_ORIENTATION_RESET,
{
LogInfo("Tizen scheme: " << uri << " reset");
elm_win_rotation_with_resize_set(window, ORIENTATION_PORTAIT_ANGLE);
+ ewk_view_orientation_send(wkView, W3C_SCREEN_ORI_PORTRAIT_PRIMARY);
return true;
} else if (strncmp(uri,
TIZEN_CHANGE_USERAGNET,
strlen(TIZEN_CHANGE_USERAGNET)) == 0)
{
LogInfo("Tizen scheme: " << uri << " change UA");
- const char* userAgentString = strstr(uri, "=") + 1;
+ const char* userAgentString = strstr(uri, "=");
if (NULL == userAgentString) {
LogDebug("UA string is NULL");
} else {
+ userAgentString++;
LogDebug("Setting custom user agent as: " << userAgentString);
ewk_view_user_agent_set(wkView, userAgentString);
}
ewk_frame_is_main_frame(ewk_policy_decision_frame_get(policyDecision));
using namespace ViewModule::SchemeActionMap;
- if (HandleTizenScheme(url, window, wkView))
- {
+ if (HandleTizenScheme(url, window, wkView)) {
LogDebug("Scheme is tizen scheme");
return false;
}