Implementation of ewk_notification_policies_removed.
authorTomasz Czekala <t.czekala@partner.samsung.com>
Thu, 15 Jan 2015 11:31:22 +0000 (12:31 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commit4694c4860d5937b435500888ea644191bede5af2
treef14968d12ea05446b8cf0fc4a7bdbacc880656d4
parentb606fa230823fde97039997b4c667a4068db84e1
Implementation of ewk_notification_policies_removed.

This API function is for removing entries from the internal
engine's cache, while the real storage of the policies is
done on the client side (such as 'browser'). I've implemented
the cache (std::map) and added implementation of
webkitNotifications.checkPermission() to use this cache to check
for the permission (this was not implemented at all and
default implementation in blink returns always 'Allowed').
As the permission checking is done in the IO thread I've
made the NotificationControllerEfl a RefCountedThreadSafe
object, so it can be passed with the ResourceContext and
accessed without webview. To make this permissions cache
feature complete we need a function to set the initial state
(which e.g. browser could read from its database) - for
this purpose there is ewk_notification_cached_permissions_set()
function and this commit contains fuctionality needed by this
function.
EWK API regarding Notification's functionality is updated
in this patch. The "notification,permission,request" smart
callback is removed and replaced with a user defined callback
set with ewk_view_notification_permission_callback_set().
Other functions added in this patch:
  ewk_notification_permission_reply
Following functions are now deprecated:
  ewk_notification_permission_request_set
  ewk_notification_permission_request_suspend

This patch is a merge of the following patches:
http://165.213.202.130:8080/#/c/69294/
http://165.213.202.130:8080/#/c/70194/
http://165.213.202.130:8080/#/c/72200/
by Filip Piechocki

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=9559
Reviewed by: Antonio Gomes, Kamil Klimek, Piotr Tworek

Change-Id: I34c818a7f09735bcbf4aec4298851a2002e7bbc1
Signed-off-by: Tomasz Czekala <t.czekala@partner.samsung.com>
47 files changed:
tizen_src/ewk/efl_integration/public/ewk_notification.cc
tizen_src/ewk/efl_integration/public/ewk_notification.h
tizen_src/ewk/efl_integration/public/ewk_security_origin.cc
tizen_src/ewk/efl_integration/public/ewk_security_origin.h
tizen_src/ewk/efl_integration/public/ewk_view.cc
tizen_src/ewk/efl_integration/public/ewk_view.h
tizen_src/ewk/efl_webview_app/app.c
tizen_src/ewk/unittest/ewk-tests.gypi
tizen_src/ewk/unittest/resources/common/sample_notification_2.html [changed mode: 0755->0644]
tizen_src/ewk/unittest/resources/common/sample_notification_3.html [deleted file]
tizen_src/ewk/unittest/utc_blink_ewk_notification_body_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_clicked_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_icon_url_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_id_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_reply_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_origin_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_set_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_suspend_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_policies_removed_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_notification_security_origin_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_showed_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_title_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_security_origin_host_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_security_origin_port_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_security_origin_protocol_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_view_notification_closed_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_view_notification_permission_callback_set_func.cpp [new file with mode: 0644]
tizen_src/impl/API/ewk_notification_private.cc [deleted file]
tizen_src/impl/API/ewk_notification_private.h [deleted file]
tizen_src/impl/browser/notification/notification_controller_efl.cc
tizen_src/impl/browser/notification/notification_controller_efl.h
tizen_src/impl/browser/web_view_browser_message_filter.cc
tizen_src/impl/browser_context_efl.cc
tizen_src/impl/browser_context_efl.h
tizen_src/impl/chromium-efl.gyp
tizen_src/impl/content_browser_client_efl.cc
tizen_src/impl/content_browser_client_efl.h
tizen_src/impl/eweb_view.cc
tizen_src/impl/eweb_view.h
tizen_src/impl/eweb_view_callbacks.h
tizen_src/impl/tizen_webview/public/tw_callbacks.h
tizen_src/impl/tizen_webview/public/tw_notification.cc
tizen_src/impl/tizen_webview/public/tw_notification.h
tizen_src/impl/tizen_webview/public/tw_security_origin.cc
tizen_src/impl/tizen_webview/public/tw_security_origin.h
tizen_src/impl/tizen_webview/public/tw_webview.cc
tizen_src/impl/tizen_webview/public/tw_webview.h