-OnWebPageBlockSelectedByOrientation(void* pUserData, Evas_Object* pView, void* pEventInfo)
-{
- _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
- SysAssertf(pImpl, "Failed to request");
-
- if (!pImpl->IsOrientationChanged())
- {
- return;
- }
-
- pImpl->SetOrientationChanged(false);
-
- int orientation = 0;
- _ControlRotation rotation = _ControlManager::GetInstance()->GetOrientationStatus();
- switch (rotation)
- {
- case _CONTROL_ROTATION_0:
- orientation = 0;
- break;
- case _CONTROL_ROTATION_90:
- orientation = 90;
- break;
- case _CONTROL_ROTATION_180:
- orientation = 180;
- break;
- case _CONTROL_ROTATION_270:
- orientation = -90;
- break;
- }
- ewk_view_orientation_send(pView, orientation);
-
- OnWebPageBlockSelected(pUserData, pView, pEventInfo);
-}
-
-
-Eina_Bool
-OnSelectUploadFile(Evas_Object* pView, Eina_Bool multipleFile, Eina_List* pAcceptTypes, const char* pCapture, void* pUserData)
-{
- String isMultipleSelection(L"single");
- result r = E_SUCCESS;
-
- HashMap dataList;
- String mode(L"selectionType");
- String type(L"type");
- _AppControlImpl* pMediaAppControlImpl = null;
-
- int itemCount = 0;
- String fileType = L"all";
-
- if (multipleFile)
- {
- isMultipleSelection.Append(L"multiple");
- }
-
- std::unique_ptr<AppControl> pMediaAppControl(_AppManagerImpl::FindAppControlN(L"tizen.filemanager", L"http://tizen.org/appcontrol/operation/pick"));
- SysTryReturn(NID_WEB_CTRL, pMediaAppControl.get(), EINA_TRUE, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- std::unique_ptr<_MediaSelectionListener> pMediaListener(new (std::nothrow) _MediaSelectionListener());
- SysTryReturn(NID_WEB_CTRL, pMediaListener.get(), EINA_TRUE, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- pMediaListener->Construct(pView, pMediaAppControl.get());
-
- itemCount = eina_list_count(pAcceptTypes);
-
- if (itemCount == 1)
- {
- String item((char*)eina_list_nth(pAcceptTypes, 0));
- if (item.StartsWith("image/",0))
- {
- fileType = L"image";
- }
- else if (item.StartsWith("audio/",0))
- {
- fileType = L"audio";
- }
- else if (item.StartsWith("video/",0))
- {
- fileType = L"video";
- }
- }
-
- r = dataList.Construct();
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = dataList.Add(mode, isMultipleSelection);
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = dataList.Add(type, fileType);
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- pMediaAppControlImpl = _AppControlImpl::GetInstance(*pMediaAppControl.get());
- r = pMediaAppControlImpl->Start(null, null, &dataList, pMediaListener.get());
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- pMediaListener.release();
- pMediaAppControl.release();
-
- return EINA_TRUE;
-
-CATCH:
- ewk_view_open_panel_reply(pView, null, EINA_FALSE);
- return EINA_TRUE;
-}
-
-
-void
-OnHandleJavaScriptRequest(void* pUserData, Evas_Object* pView, void* pEventInfo)