From e62e52f0455c739440f502563db67f0bf42f72c1 Mon Sep 17 00:00:00 2001 From: Seongjun Yim Date: Wed, 24 Jul 2013 10:22:07 +0900 Subject: [PATCH] remove openpanel logic Change-Id: I71eda631d3cfe5a064a51a45815f23f5d9da3294 Signed-off-by: Seongjun Yim --- src/controls/FWebCtrl_WebImpl.cpp | 93 --------------------------------------- 1 file changed, 93 deletions(-) diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index 3fbe037..20ad47c 100755 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -1565,97 +1565,6 @@ OnWebPageBlockSelected(void* pUserData, Evas_Object* pView, void* pEventInfo) } -Eina_Bool -OnSelectUploadFile(Evas_Object* pView, Eina_Bool multipleFile, Eina_List* pAcceptTypes, const char* pCapture, void* pUserData) -{ - std::unique_ptr<_MediaSelectionListener> pMediaListener(new (std::nothrow) _MediaSelectionListener()); - SysTryReturn(NID_WEB_CTRL, pMediaListener.get(), EINA_TRUE, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - - pMediaListener->Construct(pView); - - HashMap extraData; - result r = extraData.Construct(); - SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_TRUE, r, "[%s] Propagating.", GetErrorMessage(r)); - - String isMultipleSelection(L"single"); - String mode(L"selectionType"); - String type(L"type"); - String fileType = L"*/*"; - String operationId = L"http://tizen.org/appcontrol/operation/pick"; - - if (multipleFile) - { - isMultipleSelection.Append(L"multiple"); - } - - if (eina_list_count(pAcceptTypes) == 1) - { - String item((char*)eina_list_nth(pAcceptTypes, 0)); - String captureString(pCapture); - - if (item.StartsWith("image/",0)) - { - if (captureString == L"camera") - { - fileType = L"image/jpg"; - operationId = L"http://tizen.org/appcontrol/operation/create_content"; - String typeKey = L"http://tizen.org/appcontrol/data/camera/allow_switch"; - String typeVal = L"false"; - extraData.Add(&typeKey, &typeVal); - } - else - { - fileType = L"image/*"; - String selectKey = L"http://tizen.org/appcontrol/data/selection_mode"; - extraData.Add(&selectKey, &isMultipleSelection); - } - } - else if (item.StartsWith("audio/",0)) - { - fileType = L"audio/*"; - //TO DO: as microphone is not supported yet. suggest to throw an exception - //if (captureString == L"microphone") - //{ - //operationId = L"http://tizen.org/appcontrol/operation/create_content"; - //} - //else - //{ - String selectKey = L"http://tizen.org/appcontrol/data/selection_mode"; - extraData.Add(&selectKey, &isMultipleSelection); - //} - } - else if (item.StartsWith("video/",0)) - { - if (captureString == L"camcorder") - { - fileType = L"video/3gpp"; - operationId = L"http://tizen.org/appcontrol/operation/create_content"; - String typeKey = L"http://tizen.org/appcontrol/data/camera/allow_switch"; - String typeVal = L"false"; - extraData.Add(&typeKey, &typeVal); - } - else - { - fileType = L"video/*"; - String selectKey = L"http://tizen.org/appcontrol/data/selection_mode"; - extraData.Add(&selectKey, &isMultipleSelection); - } - } - } - - r = _AppControlImpl::FindAndStart(operationId, null, &fileType, null, &extraData, pMediaListener.get()); - SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - - pMediaListener.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) { @@ -3604,7 +3513,6 @@ _WebImpl::SetEventListenerCallback(void) const evas_object_smart_callback_add(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered, this); evas_object_smart_callback_add(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited, this); - ewk_view_open_panel_callback_set(pWebNativeNode, OnSelectUploadFile, const_cast< _WebImpl* >(this)); Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode); SysAssertf(pContext, "Failed to get webkit instance."); ewk_context_did_start_download_callback_set(pContext, OnDidStartDownloadCallback, const_cast< _WebImpl* >(this)); @@ -3688,7 +3596,6 @@ _WebImpl::RemoveEventListenerCallback(void) const evas_object_smart_callback_del(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered); evas_object_smart_callback_del(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited); - ewk_view_open_panel_callback_set(null, null, null); Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode); SysAssertf(pContext, "Failed to get webkit instance."); ewk_context_vibration_client_callbacks_set(pContext, null, null, null); -- 2.7.4