Refactor notification API
authorKamil Klimek <k.klimek@partner.samsung.com>
Fri, 2 Jan 2015 13:25:23 +0000 (14:25 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commitb11e7a10d43a0bd572175183f9599b553abc86fa
tree761aa7c937714e0d1c139ed933a20ff35402352b
parent30240e8d18f97d87e4e3924b6ffd04d102104179
Refactor notification API

HTML5 notification handling in chromium has changed and it made
impossible to implement some of existing EWK notification APIS. This
required us to refactor notification API. Notifications are now not
related with webview.

Deprecated:
 * notification,show smart callback
   - smart callbacks require webview Evas_Object
 * notification,cancel smart callback
   - smart callbacks require webview Evas_Object
 * ewk_notification_icon_url_get
   - icon is now stored internaly as SkBitmap
 * ewk_view_notification_closed
   - notifications are not related to webview

Introduced:
 * ewk_notification_callbacks_set
   - api to set callbacks for notification show/cancel
 * ewk_notification_callbacks_reset
   - resets notification callbacks to NULL
 * ewk_notification_icon_get
   - creates Evas_Object with notification icon
 * ewk_notification_closed
   - notify engine that notification was closed

Modified:
 * ewk_notification_clicked
   - return Eina_Bool to indicate if event was dispatched
   - removed Ewk_Context parameter as it is not required anymore
 * ewk_notification_showed
   - return Eina_Bool to indicate if event was dispatched
   - removed Ewk_Context parameter as it is not required anymore
 * ewk_notification_cached_permissions_set
   - return Eina_Bool to indicate if permissions were set
   - removed Ewk_Context parameter as it is not required anymore
 * ewk_notification_permission_reply
   - return Eina_Bool to indicate if operation was successful
 * ewk_notification_permission_request_set
   - return Eina_Bool to indicate if operation was successful
 * ewk_notification_permission_request_suspend
   - return Eina_Bool to indicate if operation was successful
 * ewk_notification_policies_removed
   - return Eina_Bool to indicate if operation was successful
   - removed Ewk_Context parameter as it is not required anymore

Additionaly all notification related unit tests were refactored to share
common base setup. Some unit tests were also improved to test not only
API calls but check also expected results like checking if proper JS
engine events were produced.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=9540
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=9526
Reviewed by: Antonio Gomes, Jaesik Chang, Janusz Majnert, Piotr Tworek

Change-Id: I0d5788b2a4e00a1af2d5dc6479244cc6150627df
Signed-off-by: Kamil Klimek <k.klimek@partner.samsung.com>
45 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_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_1.html [changed mode: 0755->0644]
tizen_src/ewk/unittest/resources/common/sample_notification_2.html [deleted file]
tizen_src/ewk/unittest/utc_blink_ewk_base.cpp
tizen_src/ewk/unittest/utc_blink_ewk_base.h
tizen_src/ewk/unittest/utc_blink_ewk_notification_body_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_callbacks_reset_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_callbacks_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_clicked_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_closed_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_icon_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_icon_url_get_func.cpp [deleted file]
tizen_src/ewk/unittest/utc_blink_ewk_notification_id_get_func.cpp
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_reply_func.cpp
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
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_test_base.h [new file with mode: 0644]
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 [deleted file]
tizen_src/ewk/unittest/utc_blink_ewk_view_notification_permission_callback_set_func.cpp
tizen_src/impl/browser/notification/notification_controller_efl.cc
tizen_src/impl/browser/notification/notification_controller_efl.h
tizen_src/impl/browser_context_efl.cc
tizen_src/impl/browser_context_efl.h
tizen_src/impl/content_browser_client_efl.cc
tizen_src/impl/content_browser_client_efl.h
tizen_src/impl/content_main_delegate_efl.cc
tizen_src/impl/content_main_delegate_efl.h
tizen_src/impl/eweb_view_callbacks.h
tizen_src/impl/ewk_global_data.cc
tizen_src/impl/ewk_global_data.h
tizen_src/impl/tizen_webview/public/tw_notification.cc
tizen_src/impl/tizen_webview/public/tw_notification.h