Changed mime override callback to be called per context and added user_data
authorTomasz Czekala <t.czekala@partner.samsung.com>
Tue, 27 Jan 2015 11:58:38 +0000 (12:58 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commitfcbafd295ecaecb211fccc45833e46693fcaf1a5
treee99b374f5e028a1120fd4b6261e4f69ad8acd4b6
parent26a6cae2c147861cc1c3356f8b64bef449638b8b
Changed mime override callback to be called per context and added user_data

Whenever a new URLRequest is created, it is delegated via
ResourceThrottleEfl to our PolicyResponseDelegateEfl, where we postpone
the request and are able to check and handle the mime type of the
request on the UI thread. We ask the client if the mime_type should be
changed and if yes, we push the new mime type to MimeOverrideManagerEfl
and resume the URLRequest. Later on a
ResourceDispatcherHostDelegateEfl::ShouldOverrideMimeType call we deploy
the new overridden mime type on IO thread.
Mime override callback was global for the browser and didn't have
user_data, this patch changes it to be per context and adds user_data.
This patch is based on http://165.213.202.130:8080/#/c/72514/

Together with: I1baa8e92c0b2bea44fc0332c3e034f16f4efa428
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=9463
Reviewed by: Antonio Gomes, Janusz Majnert, Min-Soo Koo, Piotr Tworek, SeungSeop Park

Change-Id: I3881faaf5fcf4d29c44a120d4723133095042b41
Signed-off-by: Tomasz Czekala <t.czekala@partner.samsung.com>
14 files changed:
tizen_src/ewk/efl_integration/public/ewk_context.cc
tizen_src/ewk/efl_integration/public/ewk_context.h
tizen_src/ewk/efl_webview_app/app.c
tizen_src/impl/browser/mime_override_manager_efl.cc [new file with mode: 0644]
tizen_src/impl/browser/mime_override_manager_efl.h [new file with mode: 0644]
tizen_src/impl/browser/policy_response_delegate_efl.cc
tizen_src/impl/browser/resource_dispatcher_host_delegate_efl.cc
tizen_src/impl/browser/resource_dispatcher_host_delegate_efl.h
tizen_src/impl/chromium-efl.gyp
tizen_src/impl/eweb_context.cc
tizen_src/impl/eweb_context.h
tizen_src/impl/tizen_webview/public/tw_callbacks.h
tizen_src/impl/tizen_webview/public/tw_web_context.cc
tizen_src/impl/tizen_webview/public/tw_web_context.h