From: yh106.jung Date: Mon, 25 May 2020 05:43:27 +0000 (-0700) Subject: Sync EWK API headers with Tizen 6.0 X-Git-Tag: submit/tizen/20201118.160233~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8e25663cec7def3fc24a5fe843a9593f6b11ea9;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Sync EWK API headers with Tizen 6.0 This patch syncronizes EWK API headers with Tizen 6.0(M1 release). Change-Id: Ic9aa91c714bc62f5302735ad1eb5a22f25b16b44 Signed-off-by: yh106.jung --- diff --git a/tizen_src/ewk/efl_integration/BUILD.gn b/tizen_src/ewk/efl_integration/BUILD.gn index 7740682..69ae5a4 100644 --- a/tizen_src/ewk/efl_integration/BUILD.gn +++ b/tizen_src/ewk/efl_integration/BUILD.gn @@ -406,8 +406,11 @@ shared_library("chromium-ewk") { "public/ewk_auth_challenge_internal.h", "public/ewk_auth_request.cc", "public/ewk_auth_request_internal.h", + "public/ewk_autofill_credit_card.cc", + "public/ewk_autofill_credit_card_internal.h", "public/ewk_autofill_profile.cc", "public/ewk_autofill_profile.h", + "public/ewk_autofill_profile_product.h", "public/ewk_back_forward_list.cc", "public/ewk_back_forward_list.h", "public/ewk_back_forward_list_item.cc", @@ -432,6 +435,8 @@ shared_library("chromium-ewk") { "public/ewk_cookie_manager.h", "public/ewk_cookie_manager_internal.h", "public/ewk_cookie_manager_product.h", + "public/ewk_cookie_parser.cc", + "public/ewk_cookie_parser.h", "public/ewk_custom_handlers.cc", "public/ewk_custom_handlers_internal.h", "public/ewk_dispatcher.cc", @@ -465,6 +470,10 @@ shared_library("chromium-ewk") { "public/ewk_main.h", "public/ewk_main_internal.h", "public/ewk_manifest_internal.h", + "public/ewk_media_downloadable_font_info.h", + "public/ewk_media_downloadable_font_info_product.h", + "public/ewk_media_parental_rating_info.h", + "public/ewk_media_parental_rating_info_product.h", "public/ewk_media_playback_info.cc", "public/ewk_media_playback_info_product.h", "public/ewk_media_subtitle_info.cc", diff --git a/tizen_src/ewk/efl_integration/private/ewk_private.h b/tizen_src/ewk/efl_integration/private/ewk_private.h index 6447045..abf2702 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_private.h @@ -8,10 +8,17 @@ #include +#include "base/logging.h" + #define COMPILE_ASSERT_MATCHING_ENUM(ewkName, webcoreName) \ COMPILE_ASSERT(int(ewkName) == int(webcoreName), mismatchingEnums) -// Temporarily added in order to track not-yet-implemented ewk api calls. -#include -#define LOG_EWK_API_MOCKUP(msg, ...) printf("[EWK_API_MOCKUP] %s:%d %s ", __FILE__, __LINE__, __PRETTY_FUNCTION__); printf(msg "\n", ##__VA_ARGS__) +#define LOG_EWK_API_MOCKUP(msg) \ + LOG(INFO) << "[EWK_API_MOCKUP] " \ + << " " << __FUNCTION__ << std::string(msg); + +#define LOG_EWK_API_DEPRECATED(msg) \ + LOG(WARNING) << "DEPRECATION WARNING: " << __FUNCTION__ \ + << " is deprecated and will be removed from next release." \ + << std::string(msg); #endif diff --git a/tizen_src/ewk/efl_integration/public/EWebKit.h b/tizen_src/ewk/efl_integration/public/EWebKit.h index 389bcb8..d110210 100644 --- a/tizen_src/ewk/efl_integration/public/EWebKit.h +++ b/tizen_src/ewk/efl_integration/public/EWebKit.h @@ -37,6 +37,7 @@ #include "ewk_geolocation.h" #include "ewk_intercept_request.h" #include "ewk_main.h" +#include "ewk_manifest.h" #include "ewk_policy_decision.h" #include "ewk_security_origin.h" #include "ewk_settings.h" diff --git a/tizen_src/ewk/efl_integration/public/EWebKit_internal.h b/tizen_src/ewk/efl_integration/public/EWebKit_internal.h index 4ac0c4b..6b2b0a1 100644 --- a/tizen_src/ewk/efl_integration/public/EWebKit_internal.h +++ b/tizen_src/ewk/efl_integration/public/EWebKit_internal.h @@ -36,6 +36,7 @@ #include "ewk_application_cache_manager_internal.h" #include "ewk_auth_challenge_internal.h" #include "ewk_auth_request_internal.h" +#include "ewk_autofill_credit_card_internal.h" #include "ewk_certificate_internal.h" #include "ewk_console_message_internal.h" #include "ewk_content_screening_detection_internal.h" diff --git a/tizen_src/ewk/efl_integration/public/EWebKit_product.h b/tizen_src/ewk/efl_integration/public/EWebKit_product.h index 471ec38..83ffcdc 100644 --- a/tizen_src/ewk/efl_integration/public/EWebKit_product.h +++ b/tizen_src/ewk/efl_integration/public/EWebKit_product.h @@ -33,11 +33,14 @@ #ifndef EWebKit_product_h #define EWebKit_product_h +#include "ewk_autofill_profile_product.h" #include "ewk_context_menu_product.h" #include "ewk_context_product.h" #include "ewk_cookie_manager_product.h" #include "ewk_form_repost_decision_product.h" #include "ewk_highcontrast_product.h" +#include "ewk_media_downloadable_font_info_product.h" +#include "ewk_media_parental_rating_info_product.h" #include "ewk_media_playback_info_product.h" #include "ewk_media_subtitle_info_product.h" #include "ewk_settings_product.h" diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card.cc b/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card.cc new file mode 100644 index 0000000..86c7ef5 --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card.cc @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2019 Samsung Electronics. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "ewk_autofill_credit_card_internal.h" +#include "private/ewk_private.h" + +Ewk_Autofill_CreditCard* ewk_autofill_credit_card_new() +{ + LOG_EWK_API_MOCKUP(); + return NULL; +} + +void ewk_autofill_credit_card_delete(Ewk_Autofill_CreditCard* credit_card) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_autofill_credit_card_data_set(Ewk_Autofill_CreditCard* credit_card, + Ewk_Autofill_Credit_Card_Data_Type type, const char* value) +{ + LOG_EWK_API_MOCKUP(); +} + +unsigned ewk_autofill_credit_card_id_get(Ewk_Autofill_CreditCard* credit_card) +{ + return 0; +} + +Eina_Stringshare* ewk_autofill_credit_card_data_get(Ewk_Autofill_CreditCard* credit_card, + Ewk_Autofill_Credit_Card_Data_Type type) +{ + return NULL; +} diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card_internal.h b/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card_internal.h new file mode 100644 index 0000000..9aa25bb --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card_internal.h @@ -0,0 +1,182 @@ +/* + * Copyright (C) 2019 Samsung Electronics. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** + * @file ewk_autofill_credit_card_internal.h + * @brief This file describes the Ewk Autofill CreditCard API. + */ + +#ifndef ewk_autofill_credit_card_internal_h +#define ewk_autofill_credit_card_internal_h + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup WEBVIEW + * @{ + */ + +/** + * @if MOBILE + * \enum _Ewk_Autofill_Credit_Card_Data_Type + * @brief Enumeration that provides an option to autofill credit_card data types. + * + * @since_tizen 4.0 + * @endif + */ + +enum _Ewk_Autofill_Credit_Card_Data_Type { + EWK_CREDIT_CARD_ID = 0, + EWK_CREDIT_CARD_NAME_FULL, + EWK_CREDIT_CARD_NUMBER, + EWK_CREDIT_CARD_EXP_MONTH, + EWK_CREDIT_CARD_EXP_4_DIGIT_YEAR, + EWK_MAX_CREDIT_CARD +}; + +/** + * @if MOBILE + * @brief Enumeration that creates a type name for the Ewk_Autofill_Credit_Card_Data_Type. + * + * @since_tizen 4.0 + * @endif + */ +typedef enum _Ewk_Autofill_Credit_Card_Data_Type Ewk_Autofill_Credit_Card_Data_Type; + +/** + * @if MOBILE + * @brief The structure type that creates a type name for #Ewk_Autofill_CreditCard. + * + * @since_tizen 4.0 + * @endif + */ +typedef struct _Ewk_Autofill_CreditCard Ewk_Autofill_CreditCard; + +/** + * @if MOBILE + * @brief Creates a new credit_card + * + * The created credit_card must be deleted by ewk_autofill_credit_card_delete + * + * @since_tizen 4.0 + * + * @return @c Ewk_Autofill_CreditCard if new credit_card is successfully created, + @c NULL otherwise + * + * @see ewk_autofill_credit_card_data_set + * @see ewk_autofill_credit_card_delete + * @endif + */ +EXPORT_API Ewk_Autofill_CreditCard* ewk_autofill_credit_card_new(void); + +/** + * @if MOBILE + * @brief Deletes a given credit_card + * + * The API will delete the a particular credit_card only from the memory. + * To remove the credit_card permenantly use + * ewk_context_form_autofill_credit_card_remove + * + * @since_tizen 4.0 + * + * @param[in] credit_card name + * + * @see ewk_autofill_credit_card_new + * @see ewk_context_form_autofill_credit_card_get + * @see ewk_context_form_autofill_credit_card_remove + * @endif + */ +EXPORT_API void ewk_autofill_credit_card_delete(Ewk_Autofill_CreditCard* card); + +/** + * @if MOBILE + * @brief Sets the data in the credit_card created by ewk_autofill_credit_card_new + * + * The data set by this function is set locally. To save it to database use + * ewk_context_form_autofill_credit_card_add + * + * @since_tizen 4.0 + * + * @param[in] credit_card contains the credit_card data + * @param[in] type type of attribute to be set + * @param[in] value value of the attribute + * + * @see ewk_autofill_credit_card_data_get + * @see Ewk_Autofill_Credit_Card_Data_Type + * @see ewk_context_form_autofill_credit_card_add + * @endif + */ +EXPORT_API void ewk_autofill_credit_card_data_set(Ewk_Autofill_CreditCard* card, Ewk_Autofill_Credit_Card_Data_Type type, const char* value); + +/** + * @if MOBILE + * @brief Gets the id attribute value from a given credit_card + * + * The credit_card obtained from ewk_context_form_autofill_credit_card_get will be used + * to get the credit_cardid + * + * @param[in] credit_card name of credit_card + * + * @since_tizen 4.0 + * + * @return @c Value of attribute (unsigned), @c 0 otherwise + * + * @see ewk_autofill_credit_card_new + * @see ewk_context_form_autofill_credit_card_get + * @see ewk_context_form_autofill_credit_card_get_all + * @endif + */ +EXPORT_API unsigned ewk_autofill_credit_card_id_get(Ewk_Autofill_CreditCard* card); + +/** + * @if MOBILE + * @brief Gets the attribute value from a given credit_card + * + * The credit_card obtained from ewk_context_form_autofill_credit_card_get will be used + * to get the data + * + * @since_tizen 4.0 + * + * @param[in] credit_card name of credit_card + * @param[in] type name of attribute + * + * @return @c Value of attribute (Eina_Stringshare*), @c NULL otherwise + * The string should be released with eina_stringshare_del() + * + * @see ewk_autofill_credit_card_new + * @see ewk_context_form_autofill_credit_card_get + * @see ewk_context_form_autofill_credit_card_get_all + * @endif + */ +EXPORT_API Eina_Stringshare* ewk_autofill_credit_card_data_get(Ewk_Autofill_CreditCard* credit_card, Ewk_Autofill_Credit_Card_Data_Type type); + +/** +* @} +*/ + +#ifdef __cplusplus +} +#endif + +#endif // ewk_autofill_credit_card_internal_h + diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.cc b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.cc index 8931ca2..2a223f1 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.cc @@ -24,7 +24,7 @@ */ #include "ewk_autofill_profile.h" - +#include "ewk_autofill_profile_product.h" #include "private/ewk_autofill_profile_private.h" #include "private/ewk_private.h" @@ -61,3 +61,45 @@ const char* ewk_autofill_profile_data_get(Ewk_Autofill_Profile* profile, return (retVal.empty()) ? NULL : strdup(retVal.c_str()); } + +Ewk_Form_Type ewk_autofill_profile_form_type_get(Ewk_Form_Info* info) +{ + LOG_EWK_API_MOCKUP("This API is not supported"); + return EWK_FORM_NONE; +} + +const char* ewk_autofill_profile_form_user_name_get(Ewk_Form_Info* info) +{ + LOG_EWK_API_MOCKUP("This API is not supported"); + return NULL; +} + +const char* ewk_autofill_profile_form_password_get(Ewk_Form_Info* info) +{ + LOG_EWK_API_MOCKUP("This API is not supported"); + return NULL; +} + +const char* ewk_autofill_profile_form_username_element_get(Ewk_Form_Info* info) +{ + LOG_EWK_API_MOCKUP("This API is not supported"); + return NULL; +} + +const char* ewk_autofill_profile_form_password_element_get(Ewk_Form_Info* info) +{ + LOG_EWK_API_MOCKUP("This API is not supported"); + return NULL; +} + +const char* ewk_autofill_profile_form_action_url_get(Ewk_Form_Info* info) +{ + LOG_EWK_API_MOCKUP("This API is not supported"); + return NULL; +} + +const char* ewk_autofill_profile_form_domain_get(Ewk_Form_Info* info) +{ + LOG_EWK_API_MOCKUP("This API is not supported"); + return NULL; +} diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h index 46a6e2c..f043b47 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h +++ b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h @@ -99,7 +99,7 @@ EXPORT_API Ewk_Autofill_Profile* ewk_autofill_profile_new(void); * @brief Deletes a given profile * * The API will delete the a particular profile only from the memory. - * To remove the profile permenantly use + * To remove the profile permanently use * ewk_context_form_autofill_profile_remove * * @since_tizen 2.4 @@ -138,7 +138,7 @@ EXPORT_API void ewk_autofill_profile_data_set(Ewk_Autofill_Profile* profile, Ewk * @brief Gets the id attribute value from a given profile * * The profile obtained from ewk_context_form_autofill_profile_get will be used - * to get the profileid + * to get the profile id * * @param[in] profile name of profile * diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile_product.h b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile_product.h new file mode 100644 index 0000000..d4a5d75 --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile_product.h @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2018-2019 Samsung Electronics. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ewk_autofill_profile_product_h +#define ewk_autofill_profile_product_h + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup WEBVIEW + * @{ + */ + +/** + * @if TV + * @brief The structure type that creates a type name for #Ewk_Form_Info. + * + * @since_tizen 5.0 + * @endif + */ +typedef struct _Ewk_Form_Info Ewk_Form_Info; + +/** + * @if TV + * \enum _Ewk_Form_Type + * @brief Enumeration that provides an option to form types. + * + * @since_tizen 5.0 + * @endif + */ +enum _Ewk_Form_Type { + EWK_FORM_NONE = 0, + EWK_FORM_USERNAME, + EWK_FORM_PASSWORD, + EWK_FORM_BOTH +}; + +/** + * @if TV + * @brief Enumeration that creates a type name for the Ewk_Form_Type. + * + * @since_tizen 5.0 + * @endif + */ +typedef enum _Ewk_Form_Type Ewk_Form_Type; + +/** + * @if TV + * @brief Gets the form type from a given form information + * + * @since_tizen 5.0 + * + * @param[in] form information + * + * @return @c Type of form + * + * @endif + */ +EXPORT_API Ewk_Form_Type ewk_autofill_profile_form_type_get(Ewk_Form_Info* info); + +/** + * @if TV + * @brief Gets the user name from a given form information + * + * @since_tizen 5.0 + * + * @param[in] form information + * + * @return @c user name + * + * @endif + */ +EXPORT_API const char* ewk_autofill_profile_form_user_name_get(Ewk_Form_Info* info); + +/** + * @if TV + * @brief Gets the password from a given form info + * + * @since_tizen 5.0 + * + * @param[in] form information + * + * @return @c password + * + * @endif + */ +EXPORT_API const char* ewk_autofill_profile_form_password_get(Ewk_Form_Info* info); + +/** + * @if TV + * @brief Gets the user name element from a given form info + * + * @since_tizen 5.0 + * + * @param[in] form information + * + * @return @c user name element + * + * @endif + */ +EXPORT_API const char* ewk_autofill_profile_form_username_element_get(Ewk_Form_Info* info); + +/** + * @if TV + * @brief Gets the password element from a given form info + * + * @since_tizen 5.0 + * + * @param[in] form information + * + * @return @c password element + * + * @endif + */ +EXPORT_API const char* ewk_autofill_profile_form_password_element_get(Ewk_Form_Info* info); + +/** + * @if TV + * @brief Gets the action url from a given form info + * + * @since_tizen 5.0 + * + * @param[in] form information + * + * @return @c action url + * + * @endif + */ +EXPORT_API const char* ewk_autofill_profile_form_action_url_get(Ewk_Form_Info* info); + +/** + * @if TV + * @brief Gets the domain from a given form info + * + * @since_tizen 5.0 + * + * @param[in] form information + * + * @return @c domain + * + * @endif + */ +EXPORT_API const char* ewk_autofill_profile_form_domain_get(Ewk_Form_Info* info); +/** +* @} +*/ + +#ifdef __cplusplus +} +#endif + +#endif // ewk_autofill_profile_product_h diff --git a/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection_internal.h b/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection_internal.h index 9e85273..e643ef9 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection_internal.h @@ -37,28 +37,7 @@ extern "C" { typedef struct _Ewk_Content_Screening_Detection Ewk_Content_Screening_Detection; /** - * Set the variable to allow the release confirm about malware error. - * - * @param content_screening_detection malware information data - * - * @param confirmed decided permission value from user - */ -EXPORT_API void ewk_content_screening_detection_confirmed_set(Ewk_Content_Screening_Detection* content_screening_detection, Eina_Bool confirmed); - -/** - * Suspend the operation for content screening detection. - * - * This suspends the operation for content screening detection when the signal is emitted. - * This is very usefull to decide the policy from the additional UI operation like the popup. - * - * @param content_screening_detection malware information data - * - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure - */ -EXPORT_API void ewk_content_screening_detection_suspend(Ewk_Content_Screening_Detection* content_screening_detection); - -/** - * Get the variable errro structure to check the error cause about malware error. + * Get the variable error structure to check the error cause about malware error. * * @param content_screening_detection malware information data * diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.cc b/tizen_src/ewk/efl_integration/public/ewk_context.cc index dcfb218..9765cddf 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_context.cc @@ -365,10 +365,8 @@ void ewk_context_memory_sampler_stop(Ewk_Context* context) Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, const char *path) { - EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE); - EINA_SAFETY_ON_NULL_RETURN_VAL(path, EINA_FALSE); - context->AddExtraPluginDir(path); - return true; + LOG_EWK_API_MOCKUP("Not Supported by chromium. Currently Deprecated"); + return EINA_FALSE; } void ewk_context_memory_saving_mode_set(Ewk_Context* context, Eina_Bool mode) @@ -803,12 +801,6 @@ void ewk_context_form_password_data_update(Ewk_Context* context, const char* url LOG_EWK_API_MOCKUP(); } -Eina_Bool ewk_context_background_music_set(Ewk_Context *ewkContext, Eina_Bool enable) -{ - LOG_EWK_API_MOCKUP(); - return false; -} - void ewk_context_application_type_set(Ewk_Context* ewkContext, const Ewk_Application_Type applicationType) { LOG_EWK_API_MOCKUP(); } @@ -825,3 +817,84 @@ void ewk_context_url_maxchars_set(Ewk_Context* context, size_t max_chars) { void ewk_context_service_worker_register(Ewk_Context* context, const char* scope_url, const char* script_url, Ewk_Context_Service_Worker_Registration_Result_Callback result_callback, void* user_data) { LOG_EWK_API_MOCKUP(); } + +void ewk_context_intercept_request_cancel_callback_set(Ewk_Context* ewk_context, Ewk_Context_Intercept_Request_Cancel_Callback callback, void* user_data) +{ + LOG_EWK_API_MOCKUP(); +} + +Eina_Bool ewk_context_background_music_get(Ewk_Context* context) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_background_music_set(Ewk_Context* context, Eina_Bool enable) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_block_multimedia_on_call_get(Ewk_Context* context) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_block_multimedia_on_call_set(Ewk_Context* context, Eina_Bool enable) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_rotation_lock_get(Ewk_Context* context) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_rotation_lock_set(Ewk_Context* context, Eina_Bool enable) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_sound_overlap_get(Ewk_Context* context) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_sound_overlap_set(Ewk_Context* context, Eina_Bool enable) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_context_app_control_set(const Ewk_Context* context, void* app_control) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +void ewk_context_max_refresh_rate_set(Ewk_Context* context, int max_refresh_rate) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_context_service_worker_unregister(Ewk_Context *context, const char* scope_url, Ewk_Context_Service_Worker_Unregistration_Result_Callback result_callback, void* user_data) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_context_enable_app_control(Ewk_Context *context, Eina_Bool enabled) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_context_form_autofill_credit_card_changed_callback_set( + Ewk_Context_Form_Autofill_CreditCard_Changed_Callback callback, + void* user_data) +{ + LOG_EWK_API_MOCKUP(); +} diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.h b/tizen_src/ewk/efl_integration/public/ewk_context.h index b58b80b..3bd5db5 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context.h +++ b/tizen_src/ewk/efl_integration/public/ewk_context.h @@ -60,15 +60,14 @@ extern "C" { typedef struct Ewk_Context Ewk_Context; /** - * \enum _Ewk_Cache_Model * @brief Contains option for cache model * * @since_tizen 2.4 */ enum _Ewk_Cache_Model { - EWK_CACHE_MODEL_DOCUMENT_VIEWER, /* Use the smallest cache capacity. */ - EWK_CACHE_MODEL_DOCUMENT_BROWSER, /* Use bigger cache capacity than EWK_CACHE_MODEL_DOCUMENT_VIEWER. */ - EWK_CACHE_MODEL_PRIMARY_WEBBROWSER /* Use the biggest cache capacity. */ + EWK_CACHE_MODEL_DOCUMENT_VIEWER, /**< Use the smallest cache capacity. */ + EWK_CACHE_MODEL_DOCUMENT_BROWSER, /**< Use bigger cache capacity than EWK_CACHE_MODEL_DOCUMENT_VIEWER. */ + EWK_CACHE_MODEL_PRIMARY_WEBBROWSER /**< Use the biggest cache capacity. */ }; /** @@ -105,7 +104,7 @@ EXPORT_API Eina_Bool ewk_context_application_cache_delete_all(Ewk_Context* conte /** * @brief Requests to set the cache model. * - * The default cache option is EWK_CACHE_MODEL_DOCUMENT_VIEWER. + * The default cache option is #EWK_CACHE_MODEL_DOCUMENT_VIEWER. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -130,7 +129,7 @@ EXPORT_API Ewk_Cache_Model ewk_context_cache_model_get(const Ewk_Context* contex /** * @if MOBILE - * @brief Saves the created profile into permenant storage + * @brief Saves the created profile into permanent storage * * The profile used to save must be created by ewk_autofill_profile_new. * Data can be added to the created profile by ewk_autofill_profile_data_set. @@ -369,6 +368,126 @@ typedef void (*Ewk_Context_Intercept_Request_Callback)(Ewk_Context* ewk_context, EXPORT_API void ewk_context_intercept_request_callback_set(Ewk_Context* ewk_context, Ewk_Context_Intercept_Request_Callback callback, void* user_data); /** + * @brief Sets Ewk_Context_Intercept_Request_Cancel_Callback + * + * @details Sets Ewk_Context_Intercept_Request_Cancel_Callback to give a chance to + * notify intercept resource request to client when url request is cancelled. + * + * @remarks Pass NULL pointer as @a callback to reset current callback. + * + * + * @param[in] ewk_context Ewk_Context object to intercept requests + * @param[in] callback New callback, NULL resets current callback + * @param[in] user_data User data passed to @a callback + * + * @see Ewk_Context_Intercept_Request_Callback + */ + +typedef Ewk_Context_Intercept_Request_Callback Ewk_Context_Intercept_Request_Cancel_Callback; + +EXPORT_API void ewk_context_intercept_request_cancel_callback_set(Ewk_Context* ewk_context, Ewk_Context_Intercept_Request_Cancel_Callback callback, void* user_data); + +/** + * @brief Gets the enabled state of background music. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * + * @return @c EINA_TRUE if background music is enabled, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_background_music_get(Ewk_Context* context); + +/** + * @brief Sets the enabled state of background music. + * + * @details This function allows the application to continue playing instead of pausing when it moves to the background. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * @param[in] enable Enable or disable background music + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_background_music_set(Ewk_Context* context, Eina_Bool enable); + +/** + * @brief Gets the enabled state of blocking multimedia on call. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * + * @return @c EINA_TRUE if blocking multimedia on call is enabled, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_block_multimedia_on_call_get(Ewk_Context* context); + +/** + * @brief Sets the enabled state of blocking multimedia on call. + * + * @details The application can set the flag to allow or disallow media playback during active call. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * @param[in] enable Enable or disable blocking multimedia on call + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_block_multimedia_on_call_set(Ewk_Context* context, Eina_Bool enable); + +/** + * @brief Gets the enabled state of rotation lock. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * + * @return @c EINA_TRUE if rotation lock is enabled, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_rotation_lock_get(Ewk_Context* context); + +/** + * @brief Sets the enabled state of rotation lock. + * + * @details The application can use this function to lock the auto screen rotation feature. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * @param[in] enable Enable or disable rotation lock + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_rotation_lock_set(Ewk_Context* context, Eina_Bool enable); + +/** + * @brief Gets the enabled state of sound overlap. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * + * @return @c EINA_TRUE if sound overlap is enabled, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_sound_overlap_get(Ewk_Context* context); + +/** + * @brief Sets the enabled state of sound overlap. + * + * @details The application can set the flag to allow or disallow the sound overlap with other apps. + * + * @since_tizen 4.0 + * + * @param[in] context The context object + * @param[in] enable Enable or disable sound overlap + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + */ +EXPORT_API Eina_Bool ewk_context_sound_overlap_set(Ewk_Context* context, Eina_Bool enable); + +/** * @} */ diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_internal.h b/tizen_src/ewk/efl_integration/public/ewk_context_internal.h index 50df975..a087de0 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_context_internal.h @@ -167,14 +167,6 @@ typedef void (*Ewk_Web_Database_Quota_Get_Callback)(uint64_t quota, void* user_d //typedef void (*Ewk_Web_Database_Path_Get_Callback)(const char* path, void* user_data); /** - * Callback for ewk_context_web_storage_origins_get. - * - * @param origins web storage origins - * @param user_data user_data will be passsed when ewk_context_web_storage_origins_get is called - */ -typedef void (*Ewk_Web_Storage_Origins_Get_Callback)(Eina_List* origins, void* user_data); - -/** * Callback for didStartDownload * * @param download_url url to download @@ -199,10 +191,28 @@ typedef Eina_Bool (*Ewk_Context_Override_Mime_For_Url_Callback)(const char* url, /* * Callback for changed profiles. * - * @param user_data user_data will be passsed when download is started + * @param data user data will be passed when autofill profile is changed */ typedef void (*Ewk_Context_Form_Autofill_Profile_Changed_Callback)(void *data); +/* + * Callback for changed credit_cards. + * + * @param data user data will be passed when credit card is changed + */ +typedef void (*Ewk_Context_Form_Autofill_CreditCard_Changed_Callback)(void *data); + +/** + * Sets callback for credit_cards change notification. + * + * @param callback pointer to callback function + * @param user_data user data returned on callback + * + */ +EXPORT_API void ewk_context_form_autofill_credit_card_changed_callback_set( + Ewk_Context_Form_Autofill_CreditCard_Changed_Callback callback, + void* user_data); + /** * Requests for freeing origins. * @@ -497,7 +507,7 @@ EXPORT_API Ewk_Context *ewk_context_new_with_injected_bundle_path_in_incognito_m * * @return @c EINA_TRUE if the directory was set, @c EINA_FALSE otherwise */ -EXPORT_API Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, const char *path); +EINA_DEPRECATED EXPORT_API Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, const char *path); /** * Sets vibration client callbacks to handle the tactile feedback in the form of @@ -532,13 +542,14 @@ EXPORT_API void ewk_context_form_autofill_profile_changed_callback_set( * The obtained profile must be deleted by ewk_autofill_profile_delete. * * @param context context object - * @param profile id + * @param id profile id * * @return @c Ewk_Autofill_Profile if profile exists, @c NULL otherwise * @see ewk_autofill_profile_delete */ EXPORT_API Ewk_Autofill_Profile* ewk_context_form_autofill_profile_get(Ewk_Context* context, unsigned id); + /** * Get tizen extensible api enable state * @@ -712,6 +723,17 @@ EXPORT_API Ewk_Storage_Manager *ewk_context_storage_manager_get(const Ewk_Contex */ EXPORT_API Eina_Bool ewk_context_web_database_delete_all(Ewk_Context* context); +/** + * Sets app_control. + * + * @param context context object + * @param app_control app_control handle. + * + * @return @c EINA_TRUE if successful, @c EINA_FALSE otherwise + * + */ +EXPORT_API Eina_Bool ewk_context_app_control_set(const Ewk_Context* context, void* app_control); + EXPORT_API Eina_Bool ewk_context_notification_callbacks_set(Ewk_Context* context, Ewk_Context_Notification_Show_Callback show_callback, Ewk_Context_Notification_Cancel_Callback cancel_callback, void* user_data); @@ -742,6 +764,16 @@ EXPORT_API void ewk_context_timezone_offset_set(Ewk_Context* context, double time_zone_offset, double daylight_saving_time); +/** + * Sets max refresh rate for @a context. + * + * @param context context object + * @param max_refresh_rate screen FPS will not exceed max_refresh_rate. It can + * be from @c 1 to @c 60 + */ +EXPORT_API void ewk_context_max_refresh_rate_set(Ewk_Context* context, + int max_refresh_rate); + enum _Ewk_Audio_Latency_Mode { EWK_AUDIO_LATENCY_MODE_LOW = 0, /**< Low audio latency mode */ EWK_AUDIO_LATENCY_MODE_MID, /**< Middle audio latency mode */ @@ -788,7 +820,7 @@ typedef void (*Ewk_Push_Message_Cb)(const char *sender_id, const char *push_data * NULL for the callbacks. * * @param context context object to set vibration client callbacks. - * @param push call funstion when the send the web push message from the + * @param push call function when the send the web push message from the * controller (may be @c NULL). * @param user_data User data (may be @c NULL). * @@ -829,6 +861,37 @@ typedef void (*Ewk_Context_Service_Worker_Registration_Result_Callback)(Ewk_Cont */ EXPORT_API void ewk_context_service_worker_register(Ewk_Context* context, const char* scope_url, const char* script_url, Ewk_Context_Service_Worker_Registration_Result_Callback result_callback, void* user_data); +/** + * Result callback for @a ewk_context_service_worker_unregister api. + * + * @param context context object + * @param scope_url scope url for which service worker unregistration was called + * @param result @c EINA_TRUE on success or @c EINA_FALSE on failure + * @param user_data user data passed to @a ewk_context_service_worker_unregister api + */ +typedef void (*Ewk_Context_Service_Worker_Unregistration_Result_Callback)(Ewk_Context *context, const char* scope_url, Eina_Bool result, void* user_data); + +/** + * Unregister service worker for scope. + * + * @param context context object + * @param scope_url scope url for which service worker should be registered + * @param result_callback result callback + * @param user_data user data to be passed to @a result_callback + */ +EXPORT_API void ewk_context_service_worker_unregister(Ewk_Context *context, const char* scope_url, Ewk_Context_Service_Worker_Unregistration_Result_Callback result_callback, void* user_data); + +/** + * Sets whether to allow app control scheme(appcontrol://) or not. + * + * @since_tizen 5.0 + * + * @param[in] context context object to enable/disable app control scheme + * @param[in] enabled a state to set + * + */ +EXPORT_API void ewk_context_enable_app_control(Ewk_Context *context, Eina_Bool enabled); + #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_menu.h b/tizen_src/ewk/efl_integration/public/ewk_context_menu.h index b41c786..bf01ce4 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context_menu.h +++ b/tizen_src/ewk/efl_integration/public/ewk_context_menu.h @@ -134,7 +134,7 @@ enum _Ewk_Context_Menu_Item_Tag{ EWK_CONTEXT_MENU_ITEM_TAG_CLIPBOARD, /**< Clipboard */ EWK_CONTEXT_MENU_ITEM_TAG_DRAG, /**< Drag */ EWK_CONTEXT_MENU_ITEM_TAG_TRANSLATE, /**< Translate */ - EWK_CONTEXT_MENU_ITEM_TAG_COPY_LINK_DATA, /**< Copy lnk data */ + EWK_CONTEXT_MENU_ITEM_TAG_COPY_LINK_DATA, /**< Copy link data */ EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG = 10000 /**< If app want to add customized item, use enum value after #EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG */ }; diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_product.h b/tizen_src/ewk/efl_integration/public/ewk_context_product.h index 2ab4676..79370a3 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_context_product.h @@ -106,17 +106,6 @@ EXPORT_API void ewk_context_proxy_set(Ewk_Context* context, const char* bypass_rule); /** - * @brief Sets the given proxy URI to network backend of specific context. - * - * @since_tizen 2.3 - * - * @param[in] context object to set proxy URI - * @param[in] proxy URI to set - */ -EXPORT_API void ewk_context_proxy_uri_set(Ewk_Context* context, - const char* proxy); - -/** * @brief Gets the proxy URI from the network backend of specific context. * * @details It returns an internal string and should not\n @@ -830,7 +819,7 @@ EXPORT_API void ewk_context_disable_nosniff_set(Ewk_Context* context, Eina_Bool * @param empCAPath Path to certificate files downloaded via EMP * @param defaultCAPath Path to certificate files have been used */ -EXPORT_API void ewk_context_emp_certificate_file_set(Ewk_Context *context, const char* empCAPath, const char* defaultCAPath); +EXPORT_API void ewk_context_emp_certificate_file_set(Ewk_Context *context, const char* emp_ca_path, const char* default_ca_path); /** * @brief Requests for getting web database usage for origin. @@ -865,18 +854,6 @@ EXPORT_API Eina_Bool ewk_context_web_database_usage_for_origin_get(Ewk_Context* EXPORT_API void ewk_context_form_password_data_update(Ewk_Context* context, const char* url, Eina_Bool useFingerprint); /** - * @brief Toggles tizen background music property enable and disable - * - * @since_tizen 2.3.2 - * - * @param[in] context context object - * @param[in] enable enable or disable tizen background music property - * - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure - */ -EXPORT_API Eina_Bool ewk_context_background_music_set(Ewk_Context *ewkContext, Eina_Bool enable); - -/** * @brief Sets the list of preferred languages. * * @details This function sets the list of preferred langages.\n @@ -895,47 +872,18 @@ EXPORT_API Eina_Bool ewk_context_background_music_set(Ewk_Context *ewkContext, E EXPORT_API void ewk_context_preferred_languages_set(Eina_List* languages); /** - * @brief Set WebSDI. - * To use WebSDI for client authentication, - * 'web-sdi' metadata need to be added in config.xml of each app. - * In that case, XWalk will call ewk_context_websdi_set API with true - * value. - * - * @param enable true means app wants to get a Client Certificate as WebSDI, - * otherwise, false - */ -EXPORT_API void ewk_context_websdi_set(Eina_Bool enable); - -/** * Sets PWA storage path @a context. * * @param context context object * @param pwa_storage_path PWA storage path * - * @return @c EINA_TRUE if the pwa_storage_path set successfully, @c EINA_FALSE - * otherwise - */ -EXPORT_API Eina_Bool -ewk_context_pwa_storage_path_set(Ewk_Context* context, - const char* pwa_storage_path); - -/** - * @brief Sets callback for checking file request accessibility. When requested - * to load a file, need to invoke the callback to check whether the file - * path is accessible - * - * @param context context object - * @param callback The callback of Ewk_Context_Check_Accessible_Path_Callback - * @return @c EINA_TRUE if successful, @c EINA_FALSE otherwise + * @return @c EINA_TRUE if the pwa_storage_path set successfully, @c EINA_FALSE otherwise */ -EXPORT_API Eina_Bool ewk_context_check_accessible_path_callback_set( - Ewk_Context* context, - Ewk_Context_Check_Accessible_Path_Callback callback, - void* user_data); +EXPORT_API Eina_Bool ewk_context_pwa_storage_path_set(Ewk_Context *context, const char *pwa_storage_path); /** - * @} - */ +* @} +*/ #ifdef __cplusplus } diff --git a/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h b/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h index aa5f361..f4a0eaa 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h +++ b/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h @@ -80,7 +80,7 @@ EXPORT_API void ewk_cookie_manager_accept_policy_set(Ewk_Cookie_Manager* manager * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @param[in] policy A #Ewk_Cookie_Accept_Policy - * @param[in] event_info The user data that will be passsed when + * @param[in] event_info The user data that will be passed when * ewk_cookie_manager_accept_policy_async_get() is called */ typedef void (*Ewk_Cookie_Manager_Policy_Async_Get_Cb)(Ewk_Cookie_Accept_Policy policy, void* event_info); @@ -135,7 +135,7 @@ EXPORT_API void ewk_cookie_manager_file_scheme_cookies_allow_set(Ewk_Cookie_Mana * @since_tizen 3.0 */ enum Ewk_Cookie_Persistent_Storage { - EWK_COOKIE_PERSISTENT_STORAGE_TEXT, /**< Cookies are stored in a text file in the Mozilla "cookies.txt" format. */ + EWK_COOKIE_PERSISTENT_STORAGE_TEXT, /**< @deprecated Cookies are stored in a text file in the Mozilla "cookies.txt" format. (Deprecated since 6.0) */ EWK_COOKIE_PERSISTENT_STORAGE_SQLITE /**< Cookies are stored in a SQLite file in the current Mozilla format. */ }; @@ -151,7 +151,7 @@ typedef enum Ewk_Cookie_Persistent_Storage Ewk_Cookie_Persistent_Storage; * * @details Cookies are initially read from @a path/Cookies to create an initial * set of cookies. Then, non-session cookies will be written to @a path/Cookies. - * By default, @a manager doesn't store the cookies persistenly, so you need to + * By default, @a manager doesn't store the cookies persistently, so you need to * call this method to keep cookies saved across sessions. * If @a path does not exist it will be created. * diff --git a/tizen_src/ewk/efl_integration/public/ewk_cookie_parser.cc b/tizen_src/ewk/efl_integration/public/ewk_cookie_parser.cc new file mode 100644 index 0000000..b4e41b2 --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_cookie_parser.cc @@ -0,0 +1,59 @@ +/** + * @file ewk_cookie_parser + * @brief EWK Cookie Parser + * + * This class exposes the Chromium cookie parser. It allows + * for ewk components to handle cookie-alike structures without + * re-inventing the wheel. + * + * Copyright 2020 by Samsung Electronics, Inc., + * + * This software is the confidential and proprietary information + * of Samsung Electronics, Inc. ("Confidential Information"). You + * shall not disclose such Confidential Information and shall use + * it only in accordance with the terms of the license agreement + * you entered into with Samsung. + */ + +#include "ewk_cookie_parser.h" + +#include +#include +#include "net/cookies/cookie_util.h" +#include "net/cookies/parsed_cookie.h" +#include "private/ewk_private.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXPORT_API Eina_Bool ewk_parse_cookie(const std::string& cookie_str, + EWKCookieContents& cookie) { + net::ParsedCookie new_cookie(cookie_str); + if (!new_cookie.IsValid() || new_cookie.IsHttpOnly() || new_cookie.IsSecure()) + return EINA_FALSE; + + cookie.name = new_cookie.Name(); + cookie.value = new_cookie.Value(); + cookie.domain = new_cookie.Domain(); + cookie.path = new_cookie.Path(); + + // Take "max-age" over "Expires" as expires is depreciated, so only supported + // for backwards compatibility. With the assumption that if you are using both + // then "Expires" is there to support old browsers. (see HTTP - spec). + if (new_cookie.HasMaxAge()) { + cookie.expiry_date_utc = time(nullptr) + stoi(new_cookie.MaxAge()); + } else if (new_cookie.HasExpires()) { + base::Time expiration_time = + net::cookie_util::ParseCookieExpirationTime(new_cookie.Expires()); + cookie.expiry_date_utc = expiration_time.ToTimeT(); + } else { + // This is a session cookie. Set expiry time to 0 + cookie.expiry_date_utc = 0; + } + return EINA_TRUE; +} + +#ifdef __cplusplus +} +#endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_cookie_parser.h b/tizen_src/ewk/efl_integration/public/ewk_cookie_parser.h new file mode 100644 index 0000000..3ed298a --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_cookie_parser.h @@ -0,0 +1,77 @@ +/** + * @file ewk_cookie_parser + * @brief EWK Cookie Parser + * + * This class exposes the Chromium cookie parser. It allows + * for ewk components to handle cookie-alike structures without + * re-inventing the wheel. + * + * Copyright 2020 by Samsung Electronics, Inc., + * + * This software is the confidential and proprietary information + * of Samsung Electronics, Inc. ("Confidential Information"). You + * shall not disclose such Confidential Information and shall use + * it only in accordance with the terms of the license agreement + * you entered into with Samsung. + */ + +#ifndef __EWK_COOKIE_PARSER_H__ +#define __EWK_COOKIE_PARSER_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup WEBVIEW + */ + +/** + * @brief This structure is used to return the contents of the parsed cookie. + * This structure is used a bridge between the Chromium cookie handling code + * and the calling application. + */ +struct EWKCookieContents { + time_t expiry_date_utc; + std::string domain; + std::string name; + std::string path; + std::string value; +}; + +/** + * @brief Parses a Cookie String and Returns the Contents. + * + * @details The application can use this function use the internal Cookie + * parsing code to decode cookie strings. This allows the calling + * application to manage non-standard cookies without effecting the + * security policies that have been set up in Chromium. These can be + * used for non-standard schemes the may want to use cookies. + * + * The cookie is only treated as valid if it should be readably by a + * javascript function. I.e. if the HttpOnly and Secure flags are not + * set. It is the responsibility of the calling application to check to + * see if the cookies expiry_date has expired. + * + * NOTE: if the cookie has an expiry_date == 0 then the cookie should + * be treated as a session cookie. + * + * @since_tizen 4.0 + * + * @param[in] cookie_str The cookie string to be decoded. + * @param[out] cookie The decoded cookie data. + * + * @return @c true if the cookie string is value, else false. + */ +EXPORT_API Eina_Bool ewk_parse_cookie(const std::string& cookie_str, + EWKCookieContents& cookie); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_error.cc b/tizen_src/ewk/efl_integration/public/ewk_error.cc index 4d9b715..0ca98e2 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_error.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_error.cc @@ -44,7 +44,7 @@ Ewk_Error_Type ewk_error_type_get(const Ewk_Error* error) return EWK_ERROR_TYPE_NETWORK; } - LOG_EWK_API_MOCKUP("Unknown error domain: %s", error->domain); + LOG(ERROR) << "Unknown error domain: " << error->domain; return EWK_ERROR_TYPE_NONE; } diff --git a/tizen_src/ewk/efl_integration/public/ewk_geolocation.h b/tizen_src/ewk/efl_integration/public/ewk_geolocation.h index 8227c697d..aa8f3cf 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_geolocation.h +++ b/tizen_src/ewk/efl_integration/public/ewk_geolocation.h @@ -18,7 +18,7 @@ /** * @file ewk_geolocation.h - * @brief This file describes the Ewk Geolacation API. + * @brief This file describes the Ewk Geolocation API. */ #ifndef ewk_geolocation_h @@ -33,6 +33,11 @@ extern "C" { #endif /** + * @addtogroup WEBVIEW + * @{ + */ + +/** * @brief The structure type that creates a type name for #Ewk_Geolocation_Permission_Request. * * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_highcontrast_product.h b/tizen_src/ewk/efl_integration/public/ewk_highcontrast_product.h index 7f084f5..9bddee6 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_highcontrast_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_highcontrast_product.h @@ -56,7 +56,8 @@ EXPORT_API Eina_Bool ewk_highcontrast_enabled_get(); * If the current page's url contains this url, it should not use highcontrast filter * * @param url URL that should not apply hightcontrast filter - * @return EINA_TRUE if successfully added + * @return @c EINA_TRUE if successfully added or @c EINA_FALSE otherwise + Note that add a reduplicative url will return EINA_FALSE */ EXPORT_API Eina_Bool ewk_highcontrast_forbidden_url_add(const char* url); @@ -64,7 +65,8 @@ EXPORT_API Eina_Bool ewk_highcontrast_forbidden_url_add(const char* url); * Remove the specific highcontrast forbidden URL. * * @param url URL that already in the forbidden url list - * @return EINA_TRUE if successfully removed + * @return @c EINA_TRUE if successfully removed or @c EINA_FALSE otherwise + Note that if the url is not exist in the list it will return EINA_FALSE */ EXPORT_API Eina_Bool ewk_highcontrast_forbidden_url_remove(const char* url); diff --git a/tizen_src/ewk/efl_integration/public/ewk_intercept_request.h b/tizen_src/ewk/efl_integration/public/ewk_intercept_request.h index f2845805..967558c 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_intercept_request.h +++ b/tizen_src/ewk/efl_integration/public/ewk_intercept_request.h @@ -55,7 +55,7 @@ typedef struct _Ewk_Intercept_Request Ewk_Intercept_Request; * @since_tizen 3.0 * * @param[in] intercept_request intercept request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * * @return @c url string on success or NULL on failure */ @@ -71,7 +71,7 @@ EXPORT_API const char* ewk_intercept_request_url_get( * @since_tizen 3.0 * * @param[in] intercept_request intercept request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * * @return @c method string on success or NULL on failure */ @@ -87,7 +87,7 @@ EXPORT_API const char* ewk_intercept_request_http_method_get( * @since_tizen 3.0 * * @param[in] intercept_request intercept request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * * @return @c Eina_Hash mapping from header name string to header value string * on success or NULL on failure @@ -106,12 +106,12 @@ EXPORT_API const Eina_Hash* ewk_intercept_request_headers_get( * the Ewk_Intercept_Request instance result in undefined behavior. * * Only use this function from inside the - * Ewk_Context_Intercept_Request_Callback. + * #Ewk_Context_Intercept_Request_Callback. * * @since_tizen 3.0 * * @param[in] intercept_request Intercept Request instance received in - * Ewk_Context_Intercept_Request_Callback + * #Ewk_Context_Intercept_Request_Callback * * @return @c EINA_TRUE on success or @c EINA_FALSE on failure */ @@ -126,7 +126,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_ignore( * for the intercepted request. * * @remarks It is allowed to use this function both inside and outside - * the Ewk_Context_Intercept_Request_Callback. + * the #Ewk_Context_Intercept_Request_Callback. * * After this call, handling the request is done. Any further calls on * the Ewk_Intercept_Request instance result in undefined behavior. @@ -136,11 +136,11 @@ EXPORT_API Eina_Bool ewk_intercept_request_ignore( * * Alternatively you can use following functions which are more * convenient: - * - ewk_intercept_request_response_status_set - * - ewk_intercept_request_response_header_add - * - ewk_intercept_request_response_header_map_add - * - ewk_intercept_request_response_body_set - * - ewk_intercept_request_response_write_chunk + * - ewk_intercept_request_response_status_set() + * - ewk_intercept_request_response_header_add() + * - ewk_intercept_request_response_header_map_add() + * - ewk_intercept_request_response_body_set() + * - ewk_intercept_request_response_write_chunk() * * Using this function overrides status and headers set with functions * listed above. @@ -148,7 +148,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_ignore( * @since_tizen 3.0 * * @param[in] intercept_request Intercept Request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * @param[in] headers Null-terminated string representing response's headers * for the intercept request. * By HTTP spec, lines should end with a newline ('\\r\\n') and @@ -166,7 +166,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_set( * @brief Sets status code and status text of response for intercepted request. * * @remarks It is allowed to use this function both inside and outside the - * Ewk_Context_Intercept_Request_Callback. + * #Ewk_Context_Intercept_Request_Callback. * * In case of failure of this function finish writing for this * intercept request. @@ -174,7 +174,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_set( * @since_tizen 3.0 * * @param[in] intercept_request Intercept Request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * @param[in] status_code HTTP response status code * @param[in] custom_status_text HTTP response reason phrase, pass NULL to use * recommended reason phrase (example: "OK" for code 200) @@ -189,7 +189,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_status_set( * @brief Adds HTTP header to response for intercepted request. * * @remarks It is allowed to use this function both inside and outside - * the Ewk_Context_Intercept_Request_Callback. + * the #Ewk_Context_Intercept_Request_Callback. * * In case of failure of this function finish writing for this * intercept request. @@ -197,7 +197,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_status_set( * @since_tizen 3.0 * * @param[in] intercept_request Intercept Request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * @param[in] field_name HTTP header field name * @param[in] field_value HTTP header field value * @@ -211,7 +211,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_header_add( * @brief Adds HTTP headers to response for intercepted request. * * @remarks It is allowed to use this function both inside and outside - * the Ewk_Context_Intercept_Request_Callback. + * the #Ewk_Context_Intercept_Request_Callback. * * In case of failure of this function finish writing for this * intercept request. @@ -219,7 +219,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_header_add( * @since_tizen 3.0 * * @param[in] intercept_request Intercept Request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback. + * #Ewk_Context_Intercept_Request_Callback ewk_context callback. * @param[in] headers Map from HTTP header field names to field values, both * represented as null terminated strings * @@ -236,7 +236,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_header_map_add( * intercepted request. * * @remarks It is allowed to use this function both inside and outside - * the Ewk_Context_Intercept_Request_Callback. + * the #Ewk_Context_Intercept_Request_Callback. * * After this call, handling the request is done. Any further calls on * the Ewk_Intercept_Request instance result in undefined behavior. @@ -247,7 +247,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_header_map_add( * @since_tizen 3.0 * * @param[in] intercept_request Intercept Request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * @param[in] body Response body for the intercept request * @param[in] length Length of response body * @@ -255,9 +255,9 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_header_map_add( * * @pre Before writing response body, you should set response status and * headers using the following functions: - * - ewk_intercept_request_response_status_set - * - ewk_intercept_request_response_header_add - * - ewk_intercept_request_response_header_map_add + * - ewk_intercept_request_response_status_set() + * - ewk_intercept_request_response_header_add() + * - ewk_intercept_request_response_header_map_add() * */ EXPORT_API Eina_Bool ewk_intercept_request_response_body_set( @@ -275,10 +275,10 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_body_set( * Any further calls on the Ewk_Intercept_Request instance result in * undefined behavior. User should always check return value, because * response to this request might not be needed anymore, and function - * can retrun EINA_FALSE even though user still has data to write. + * can return EINA_FALSE even though user still has data to write. * * It is only allowed to use this function *outside* of the - * Ewk_Context_Intercept_Request_Callback. + * #Ewk_Context_Intercept_Request_Callback. * * If a part of response body has been written with this function, you * can't use the following functions anymore: @@ -293,7 +293,7 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_body_set( * @since_tizen 3.0 * * @param[in] intercept_request Intercept Request instance received from - * Ewk_Context_Intercept_Request_Callback ewk_context callback + * #Ewk_Context_Intercept_Request_Callback ewk_context callback * @param[in] chunk Part of response body for intercepted request * @param[in] length Length of response body part * @@ -301,9 +301,9 @@ EXPORT_API Eina_Bool ewk_intercept_request_response_body_set( * * @pre Before writing response body, you should set response status * and headers using the following functions: - * - ewk_intercept_request_response_status_set - * - ewk_intercept_request_response_header_add - * - ewk_intercept_request_response_header_map_add + * - ewk_intercept_request_response_status_set() + * - ewk_intercept_request_response_header_add() + * - ewk_intercept_request_response_header_map_add() * * @post After writing full response body in chunks using this function, call * it again with NULL as @a chunk and 0 as @a length, to signal that diff --git a/tizen_src/ewk/efl_integration/public/ewk_main.cc b/tizen_src/ewk/efl_integration/public/ewk_main.cc index 13b61fb..e20617b 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_main.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_main.cc @@ -190,6 +190,16 @@ void ewk_set_arguments(int argc, char** argv) CommandLineEfl::Init(argc, argv); } +void ewk_process_model_set(Ewk_Process_Model process_model) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_memory_optimization_mode_enable(void) +{ + LOG_EWK_API_MOCKUP(); +} + void ewk_home_directory_set(const char* path) { if (!path) diff --git a/tizen_src/ewk/efl_integration/public/ewk_main_internal.h b/tizen_src/ewk/efl_integration/public/ewk_main_internal.h index 68ff729..a787025 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_main_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_main_internal.h @@ -38,6 +38,56 @@ extern "C" { #endif +enum Ewk_Process_Model { + EWK_PROCESS_MODEL_MULTI, + EWK_PROCESS_MODEL_MULTI_WITH_SINGLE_RENDERER, + EWK_PROCESS_MODEL_SINGLE, +}; + +/** + * @brief Enumeration that creates a type name for the #Ewk_Process_Model. + * @since_tizen 6.0 + */ +typedef enum Ewk_Process_Model Ewk_Process_Model; + +/** + * @brief Decide which process model to use to launch Chromium + * + * Must be called before the following APIs:\n + * ewk_view_add\n + * ewk_view_add_in_incognito_mode\n + * ewk_view_add_with_context\n + * ewk_view_add_with_session_data\n + * ewk_context_default_get\n + * ewk_context_new\n + * ewk_context_new_with_injected_bundle_path + * + * @details Choose process model from single process model, + * multi process model and multi process model with single renderer process. + * + * @since_tizen 6.0 + */ +EXPORT_API void ewk_process_model_set(Ewk_Process_Model process_model); + +/** + * @brief Enable memory optimization mode. + * + * Must be called before the following APIs:\n + * ewk_view_add\n + * ewk_view_add_in_incognito_mode\n + * ewk_view_add_with_context\n + * ewk_view_add_with_session_data\n + * ewk_context_default_get\n + * ewk_context_new\n + * ewk_context_new_with_injected_bundle_path + * + * @details Memory optimization mode decreases memory usage especially graphic related. + * But, it could cause performance degradations. + * + * @since_tizen 6.0 + */ +EXPORT_API void ewk_memory_optimization_mode_enable(void); + /** * Set argument count and argument vector. * @@ -81,12 +131,13 @@ extern "C" { EXPORT_API void ewk_set_arguments(int argc, char** argv); /** +* Deprecated. * Set home directory. * * If new path is NULL or empty string, home directory is considered as not set. * */ -EXPORT_API void ewk_home_directory_set(const char* path); +EINA_DEPRECATED EXPORT_API void ewk_home_directory_set(const char* path); #ifdef __cplusplus } diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_downloadable_font_info.h b/tizen_src/ewk/efl_integration/public/ewk_media_downloadable_font_info.h new file mode 100644 index 0000000..9f7f099 --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_media_downloadable_font_info.h @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2018 Samsung Electronics. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ewk_media_downloadable_font_info_h +#define ewk_media_downloadable_font_info_h + +#include "ewk_media_downloadable_font_info_product.h" +#include "private/ewk_private.h" + +#ifdef __cplusplus +extern "C" { +#endif + +Ewk_Media_Downloadable_Font_Info* ewkMediaDownloadableFontInfoCreate( + const char* schemeIdUri, + const char* value, + const char* data, + int type) { + Ewk_Media_Downloadable_Font_Info* font_info = new Ewk_Media_Downloadable_Font_Info; + font_info->schemeIdUri = eina_stringshare_add(schemeIdUri ? schemeIdUri : ""); + font_info->value = eina_stringshare_add(value ? value : ""); + font_info->data = eina_stringshare_add(data ? data : ""); + font_info->type = type; + return font_info; +} + +void ewkMediaDownloadableFontInfoDelete(Ewk_Media_Downloadable_Font_Info* font_info) { + if (font_info->schemeIdUri) + eina_stringshare_del(font_info->schemeIdUri); + if (font_info->value) + eina_stringshare_del(font_info->value); + if (font_info->data) + eina_stringshare_del(font_info->data); + delete font_info; +} + +#ifdef __cplusplus +} +#endif +#endif // ewk_media_downloadable_font_info_h \ No newline at end of file diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_downloadable_font_info_product.h b/tizen_src/ewk/efl_integration/public/ewk_media_downloadable_font_info_product.h new file mode 100644 index 0000000..27ab600 --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_media_downloadable_font_info_product.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2018 Samsung Electronics. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ewk_media_downloadable_font_info_product_h +#define ewk_media_downloadable_font_info_product_h + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _Ewk_Media_Downloadable_Font_Info { + const char* schemeIdUri; + const char* value; + const char* data; + int type; +}Ewk_Media_Downloadable_Font_Info; + +#ifdef __cplusplus +} +#endif +#endif // ewk_media_downloadable_font_info_product_h \ No newline at end of file diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_parental_rating_info.h b/tizen_src/ewk/efl_integration/public/ewk_media_parental_rating_info.h new file mode 100644 index 0000000..988c65d --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_media_parental_rating_info.h @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2018 Samsung Electronics. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @file ewk_media_parental_rating_info.h + * @brief This file describes the ewk media parental rating info API. + */ + +#ifndef ewk_media_parental_rating_info_h +#define ewk_media_parental_rating_info_h + + +#include "ewk_media_parental_rating_info_product.h" +#include "private/ewk_private.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +Ewk_Media_Parental_Rating_Info* ewkMediaParentalRatingInfoCreate(const char* info, + const char* url) { + Ewk_Media_Parental_Rating_Info* data = new Ewk_Media_Parental_Rating_Info; + data->parentalInfoStr = eina_stringshare_add(info ? info : ""); + data->url = eina_stringshare_add(url ? url : ""); + return data; +} + +void ewkMediaParentalRatingInfoDelete(Ewk_Media_Parental_Rating_Info* data) { + if (data->parentalInfoStr) + eina_stringshare_del(data->parentalInfoStr); + if (data->url) + eina_stringshare_del(data->url); + delete data; +} + +#ifdef __cplusplus +} +#endif +#endif // ewk_media_parental_rating_info_h diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_parental_rating_info_product.h b/tizen_src/ewk/efl_integration/public/ewk_media_parental_rating_info_product.h new file mode 100644 index 0000000..529b648 --- /dev/null +++ b/tizen_src/ewk/efl_integration/public/ewk_media_parental_rating_info_product.h @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2018 Samsung Electronics. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @file ewk_media_playback_info_product.h + * @brief This file describes the ewk media playback info API. + */ + +#ifndef ewk_media_parental_rating_info_product_h +#define ewk_media_parental_rating_info_product_h + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _Ewk_Media_Parental_Rating_Info { + const char* parentalInfoStr; + const char* url; +}Ewk_Media_Parental_Rating_Info; + +#ifdef __cplusplus +} +#endif +#endif // ewk_media_playback_info_product_h diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc index d5b4991..91a50f8 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc @@ -52,7 +52,7 @@ const char* ewk_media_playback_info_drm_info_get( void ewk_media_playback_info_media_resource_acquired_set( Ewk_Media_Playback_Info* data, - unsigned char media_resource_acquired) { + Eina_Bool media_resource_acquired) { LOG_EWK_API_MOCKUP(); } @@ -65,3 +65,30 @@ void ewk_media_playback_info_drm_info_set(Ewk_Media_Playback_Info* data, const char* drm_info) { LOG_EWK_API_MOCKUP(); } + +const int ewk_media_playback_info_video_id_get(Ewk_Media_Playback_Info* data) +{ + LOG_EWK_API_MOCKUP(); +} + +#if defined(OS_TIZEN_TV_PRODUCT) +Ewk_Media_Playback_Info* ewkMediaPlaybackInfoCreate(const int player_id, + const char* url, + const char* mime_type) +{ + LOG_EWK_API_MOCKUP(); + return NULL; +} + +Eina_Bool ewk_media_playback_info_media_resource_acquired_get( + Ewk_Media_Playback_Info* data) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +void ewkMediaPlaybackInfoDelete(Ewk_Media_Playback_Info* data) +{ + LOG_EWK_API_MOCKUP(); +} +#endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.h b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.h deleted file mode 100644 index ca49616..0000000 --- a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2016 Samsung Electronics. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @file ewk_media_playback_info.h - * @brief This file describes the ewk media playback info API. - */ - -#ifndef ewk_media_playback_info_h -#define ewk_media_playback_info_h - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _Ewk_Media_Playback_Info Ewk_Media_Playback_Info; - -/** - * Get url of media. - * - * @param meia playback info's structure - * - * @return @c media url - */ -EXPORT_API const char* ewk_media_playback_info_media_url_get( - Ewk_Media_Playback_Info* data); - -/** - * Get mime type of media. - * - * @param meia playback info's structure - * - * @return @c mime type - */ -EXPORT_API const char* ewk_media_playback_info_mime_type_get( - Ewk_Media_Playback_Info* data); - -/** - * Get translated url of media. - * - * @param media playback info's structure - * - * @return @c translated url - */ -EXPORT_API const char* ewk_media_playback_info_translated_url_get( - Ewk_Media_Playback_Info* data); - -/** - * Get drm info of media. - * - * @param media playback info's structure - * - * @return @c drm info - */ -EXPORT_API const char* ewk_media_playback_info_drm_info_get( - Ewk_Media_Playback_Info* data); - -/** - * Set media resource acquired of media. - * - * @param media playback info's structure - */ -EXPORT_API void ewk_media_playback_info_media_resource_acquired_set( - Ewk_Media_Playback_Info* data, - unsigned char media_resource_acquired); - -/** - * Set translated url of media. - * - * @param media playback info's structure - */ -EXPORT_API void ewk_media_playback_info_translated_url_set( - Ewk_Media_Playback_Info* data, - const char* translated_url); - -/** - * Set drm info of media. - * - * @param media playback info's structure - */ -EXPORT_API void ewk_media_playback_info_drm_info_set( - Ewk_Media_Playback_Info* data, - const char* drm_info); - -#ifdef __cplusplus -} -#endif -#endif // ewk_media_playback_info_h diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h index 5061f9e..a2fe3af 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h @@ -42,6 +42,16 @@ extern "C" { typedef struct _Ewk_Media_Playback_Info Ewk_Media_Playback_Info; /** + * Get video id of media. + * + * @param meia playback info's structure + * + * @return @c video id + */ +EXPORT_API const int ewk_media_playback_info_video_id_get( + Ewk_Media_Playback_Info* data); + +/** * Get url of media. * * @param meia playback info's structure @@ -88,7 +98,7 @@ EXPORT_API const char* ewk_media_playback_info_drm_info_get( */ EXPORT_API void ewk_media_playback_info_media_resource_acquired_set( Ewk_Media_Playback_Info* data, - unsigned char media_resource_acquired); + Eina_Bool media_resource_acquired); /** * Set translated url of media. @@ -108,6 +118,15 @@ EXPORT_API void ewk_media_playback_info_drm_info_set( Ewk_Media_Playback_Info* data, const char* drm_info); +#if defined(OS_TIZEN_TV_PRODUCT) +Ewk_Media_Playback_Info* ewkMediaPlaybackInfoCreate(const int player_id, + const char* url, + const char* mime_type); +Eina_Bool ewk_media_playback_info_media_resource_acquired_get( + Ewk_Media_Playback_Info* data); +void ewkMediaPlaybackInfoDelete(Ewk_Media_Playback_Info* data); +#endif + #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc index c4e071e..14278e3 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc @@ -52,3 +52,27 @@ const void* ewk_media_subtitle_data_get(Ewk_Media_Subtitle_Data *data) LOG_EWK_API_MOCKUP(); return NULL; } + +#if defined(OS_TIZEN_TV_PRODUCT) +Ewk_Media_Subtitle_Info* ewkMediaSubtitleInfoCreate(int id, const char* url, const char* lang, const char* label) +{ + LOG_EWK_API_MOCKUP(); + return NULL; +} + +void ewkMediaSubtitleInfoDelete(Ewk_Media_Subtitle_Info* data) +{ + LOG_EWK_API_MOCKUP(); +} + +Ewk_Media_Subtitle_Data* ewkMediaSubtitleDataCreate(int id, double timestamp, const void* data, unsigned size) +{ + LOG_EWK_API_MOCKUP(); + return NULL; +} + +void ewkMediaSubtitleDataDelete(Ewk_Media_Subtitle_Data* data) +{ + LOG_EWK_API_MOCKUP(); +} +#endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.h b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.h deleted file mode 100644 index 708c4e0..0000000 --- a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2016 Samsung Electronics. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -/** -* @file ewk_media_subtitle_info.h -* @brief . -*/ - -#ifndef ewk_media_subtitle_info_h -#define ewk_media_subtitle_info_h - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _Ewk_Media_Subtitle_Info Ewk_Media_Subtitle_Info; - -/** -* Get id of subtitle. -* -* @param meia subtitle info's structure -* -* @return @c subtitle id -*/ -EXPORT_API int ewk_media_subtitle_info_id_get(Ewk_Media_Subtitle_Info *data); - -/** -* Get url of subtitle. -* -* @param meia subtitle info's structure -* -* @return @c subtitle url -*/ -EXPORT_API const char *ewk_media_subtitle_info_url_get(Ewk_Media_Subtitle_Info *data); - -/** -* Get srcLang of subtitle. -* -* @param meia subtitle info's structure -* -* @return @c subtitle srcLang -*/ -EXPORT_API const char *ewk_media_subtitle_info_lang_get(Ewk_Media_Subtitle_Info *data); - -/** -* Get label of subtitle. -* -* @param meia subtitle info's structure -* -* @return @c subtitle label -*/ -EXPORT_API const char *ewk_media_subtitle_info_label_get(Ewk_Media_Subtitle_Info *data); - -typedef struct _Ewk_Media_Subtitle_Data Ewk_Media_Subtitle_Data; - -/** -* Get id of subtitle. -* -* @param meia subtitle data's structure -* -* @return @c subtitle id -*/ -EXPORT_API int ewk_media_subtitle_data_id_get(Ewk_Media_Subtitle_Data *data); - -/** -* Get timestamp of subtitle. -* -* @param meia subtitle data's structure -* -* @return @c subtitle timestamp -*/ -EXPORT_API double ewk_media_subtitle_data_timestamp_get(Ewk_Media_Subtitle_Data *data); - -/** -* Get data size of subtitle. -* -* @param meia subtitle data's structure -* -* @return @c subtitle data size -*/ -EXPORT_API unsigned ewk_media_subtitle_data_size_get(Ewk_Media_Subtitle_Data *data); - -/** -* Get data of subtitle. -* -* @param meia subtitle data's structure -* -* @return @c subtitle data -*/ -EXPORT_API const void* ewk_media_subtitle_data_get(Ewk_Media_Subtitle_Data *data); - -#ifdef __cplusplus -} -#endif -#endif // ewk_media_subtitle_info_h diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h index 9c2b088..e9b1619 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h @@ -115,6 +115,18 @@ EXPORT_API unsigned ewk_media_subtitle_data_size_get(Ewk_Media_Subtitle_Data *da */ EXPORT_API const void* ewk_media_subtitle_data_get(Ewk_Media_Subtitle_Data *data); +#if defined(OS_TIZEN_TV_PRODUCT) +Ewk_Media_Subtitle_Info* ewkMediaSubtitleInfoCreate(int id, const char* url, +const char* lang, const char* label); + +void ewkMediaSubtitleInfoDelete(Ewk_Media_Subtitle_Info* data); + +Ewk_Media_Subtitle_Data* ewkMediaSubtitleDataCreate(int id, double timestamp, +const void* data, unsigned size); + +void ewkMediaSubtitleDataDelete(Ewk_Media_Subtitle_Data* data); +#endif + #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc b/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc index 54c8e38..50b8a9a0 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc @@ -119,9 +119,8 @@ Eina_Bool ewk_policy_decision_ignore(Ewk_Policy_Decision* policyDecision) Eina_Bool ewk_policy_decision_download(Ewk_Policy_Decision* policyDecision) { - EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EINA_FALSE); - policyDecision->Download(); - return EINA_TRUE; + LOG_EWK_API_MOCKUP("This API is deprecated"); + return EINA_FALSE; } Ewk_Policy_Navigation_Type ewk_policy_decision_navigation_type_get(Ewk_Policy_Decision* policyDecision) diff --git a/tizen_src/ewk/efl_integration/public/ewk_policy_decision_internal.h b/tizen_src/ewk/efl_integration/public/ewk_policy_decision_internal.h index 602fcf9..0931dd9 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_policy_decision_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_policy_decision_internal.h @@ -70,7 +70,7 @@ EXPORT_API Eina_Bool ewk_policy_decision_suspend(Ewk_Policy_Decision* policy_dec * * @return @c EINA_TRUE on success or @c EINA_FALSE on failure */ -EXPORT_API Eina_Bool ewk_policy_decision_download(Ewk_Policy_Decision* policy_decision); +EINA_DEPRECATED EXPORT_API Eina_Bool ewk_policy_decision_download(Ewk_Policy_Decision* policy_decision); /** * Gets the frame reference from Policy Decision object. diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.cc b/tizen_src/ewk/efl_integration/public/ewk_settings.cc index ae024bb..84b815c 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_settings.cc @@ -266,16 +266,14 @@ Eina_Bool ewk_settings_scan_malware_enabled_set(Ewk_Settings* settings, Eina_Boo Eina_Bool ewk_settings_spdy_enabled_set(Ewk_Settings* settings, Eina_Bool spdyEnabled) { - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE); - settings->setSpdyEnabled(spdyEnabled); - - return EINA_TRUE; + LOG_EWK_API_DEPRECATED("This API is deprecated, not Supported by chromium. spdy is deprecated in m50 and replace with HTTP2 handling."); + return EINA_FALSE; } Eina_Bool ewk_settings_spdy_enabled_get(Ewk_Settings *settings) { - LOG_EWK_API_MOCKUP(); - return false; + LOG_EWK_API_DEPRECATED("This API is deprecated, not Supported by chromium. spdy is deprecated in m50 and replace with HTTP2 handling."); + return EINA_FALSE; } Eina_Bool ewk_settings_performance_features_enabled_set(Ewk_Settings* settings, Eina_Bool spdyEnabled) @@ -893,17 +891,32 @@ void ewk_settings_disclose_set_cookie_headers_enabled(Ewk_Settings* settings, Ei LOG_EWK_API_MOCKUP(); } -Eina_Bool ewk_settings_viewport_meta_tag_set(Ewk_Settings* settings, Eina_Bool enable) { +Eina_Bool ewk_settings_viewport_meta_tag_set(Ewk_Settings* settings, Eina_Bool enable) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_settings_viewport_meta_tag_get(const Ewk_Settings *settings) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +void ewk_settings_spatial_navigation_enabled_set(Ewk_Settings* settings, Eina_Bool Enabled) +{ LOG_EWK_API_MOCKUP(); - return false; } -void ewk_settings_spatial_navigation_enabled_set(Ewk_Settings* settings, Eina_Bool Enabled) { +void ewk_settings_ime_panel_enabled_set(Ewk_Settings* settings, Eina_Bool Enabled) +{ LOG_EWK_API_MOCKUP(); } -void ewk_settings_ime_panel_enabled_set(Ewk_Settings* settings, Eina_Bool Enabled) { +Eina_Bool ewk_settings_ime_panel_enabled_get(const Ewk_Settings *settings) +{ LOG_EWK_API_MOCKUP(); + return EINA_FALSE; } Eina_Bool ewk_settings_allow_file_access_from_external_url_set(Ewk_Settings* settings, Eina_Bool allow) { @@ -911,7 +924,36 @@ Eina_Bool ewk_settings_allow_file_access_from_external_url_set(Ewk_Settings* set return false; } -Eina_Bool ewk_settings_swipe_to_refresh_enabled_set(Ewk_Settings* settings, Eina_Bool enable) { +Eina_Bool ewk_settings_swipe_to_refresh_enabled_set(Ewk_Settings* settings, Eina_Bool enable) +{ LOG_EWK_API_MOCKUP(); - return false; + return EINA_FALSE; +} + +Eina_Bool ewk_settings_swipe_to_refresh_enabled_get(const Ewk_Settings *settings) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +void ewk_settings_drag_drop_enabled_set(Ewk_Settings* settings, Eina_Bool enabled) +{ + LOG_EWK_API_MOCKUP(); +} + +Eina_Bool ewk_settings_drag_drop_enabled_get(const Ewk_Settings* settings) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +void ewk_settings_clipboard_enabled_set(Ewk_Settings* settings, Eina_Bool enabled) +{ + LOG_EWK_API_MOCKUP(); +} + +Eina_Bool ewk_settings_clipboard_enabled_get(const Ewk_Settings* settings) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; } diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.h b/tizen_src/ewk/efl_integration/public/ewk_settings.h index 868fd3c..ffea564 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings.h +++ b/tizen_src/ewk/efl_integration/public/ewk_settings.h @@ -52,7 +52,7 @@ typedef struct Ewk_Settings Ewk_Settings; * * @since_tizen 2.4 * - * @param[in] setting Setting object to set password form autofill + * @param[in] settings Settings object to set password form autofill * @param[in] enable @c EINA_TRUE to enable password form autofill * @c EINA_FALSE to disable * @@ -67,7 +67,7 @@ EXPORT_API Eina_Bool ewk_settings_autofill_password_form_enabled_set(Ewk_Setting * * @since_tizen 2.4 * - * @param[in] setting Setting object to set form candidate data for autofill + * @param[in] settings Settings object to set form candidate data for autofill * @param[in] enable @c EINA_TRUE to enable form candidate data for autofill * @c EINA_FALSE to disable * @@ -259,23 +259,8 @@ EXPORT_API Eina_Bool ewk_settings_scripts_can_open_windows_set(Ewk_Settings* set EXPORT_API Eina_Bool ewk_settings_scripts_can_open_windows_get(const Ewk_Settings* settings); /** - * Enables/disables the viewport meta tag. - * - * By default, the viewport meta tag is enabled on mobile and wearable, - * but it is disabled on TV. - * - * @param settings settings object - * @param enable @c EINA_TRUE to enable the viewport meta tag - * @c EINA_FALSE to disable - * - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure - */ -EXPORT_API Eina_Bool ewk_settings_viewport_meta_tag_set(Ewk_Settings* settings, - Eina_Bool enable); - -/** - * @} - */ +* @} +*/ #ifdef __cplusplus } diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings_internal.h b/tizen_src/ewk/efl_integration/public/ewk_settings_internal.h index 4abe353..38437cf 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_settings_internal.h @@ -101,6 +101,30 @@ EXPORT_API Eina_Bool ewk_settings_fullscreen_enabled_set(Ewk_Settings *settings, */ EXPORT_API Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings *settings); +/* + * Enables/disables swipe to refresh feature. Swipe to refresh allows + * us to refresh page using swipe gesture. + * + * Default value for swipe to refresh setting is @c EINA_FALSE. + * + * @param settings settings object to enable swipe to refresh feature + * @param enable @c EINA_TRUE to enable swipe to refresh feature or + * @c EINA_FALSE to disable + * + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure + */ +EXPORT_API Eina_Bool ewk_settings_swipe_to_refresh_enabled_set(Ewk_Settings *settings, Eina_Bool enable); + +/** + * Returns whether swipe to refresh feature is enabled or not. + * + * @param settings settings object to query whether swipe to refresh feature is enabled + * + * @return @c EINA_TRUE if the swipe to refresh feature is enabled + * @c EINA_FALSE if not or on failure + */ +EXPORT_API Eina_Bool ewk_settings_swipe_to_refresh_enabled_get(const Ewk_Settings *settings); + /** * Requests enables/disables the plug-ins. * @@ -122,24 +146,14 @@ EXPORT_API Eina_Bool ewk_settings_plugins_enabled_set(Ewk_Settings *settings, Ei EXPORT_API Eina_Bool ewk_settings_plugins_enabled_get(const Ewk_Settings *settings); /** - * Checks whether WebKit supports the @a encoding. - * - * @param encoding the encoding string to check whether WebKit supports it - * - * @return @c EINA_TRUE if WebKit supports @a encoding or @c EINA_FALSE if not or - * on failure - */ -EXPORT_API Eina_Bool ewk_settings_is_encoding_valid(const char* encoding); - -/** - * Requests to set default text encoding name. - * - * @param settings settings object to set default text encoding name - * @param encoding default text encoding name - * - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure - */ -EXPORT_API Eina_Bool ewk_settings_default_encoding_set(Ewk_Settings *settings, const char* encoding); + * Checks whether WebKit supports the @a encoding. + * + * @param encoding the encoding string to check whether WebKit supports it + * + * @return @c EINA_TRUE if WebKit supports @a encoding + * @c EINA_FALSE if not or on failure + */ + EXPORT_API Eina_Bool ewk_settings_is_encoding_valid(const char* encoding); /** * Sets link magnifier enabled. @@ -298,27 +312,6 @@ EXPORT_API Eina_Bool ewk_settings_text_autosizing_enabled_set(Ewk_Settings *sett */ EXPORT_API Eina_Bool ewk_settings_text_autosizing_enabled_get(const Ewk_Settings *settings); - -/** - * Sets the scale factor for text autosizing. - * - * Default value is 1.0. - * - * @param settings settings object to set the text autosizing - * @param factor font scale factor for text autosizing - */ -EXPORT_API Eina_Bool ewk_settings_text_autosizing_font_scale_factor_set(Ewk_Settings *settings, double factor); - -/** - * Gets the current scale factor for text autosizing. - * - * @param settings settings object to set scale factor for text autosizing - * - * @return the current font scale factor for text autosizing. - * In case of error, it returns non-positive value. - */ -EXPORT_API double ewk_settings_text_autosizing_font_scale_factor_get(const Ewk_Settings *settings); - /** * Requests to enable/disable edge effect * @@ -341,23 +334,6 @@ EXPORT_API Eina_Bool ewk_settings_edge_effect_enabled_set(Ewk_Settings* settings EXPORT_API Eina_Bool ewk_settings_edge_effect_enabled_get(const Ewk_Settings* settings); /** - * Sets text style for selection mode enabled. - * - * @param settings settings object - * @param enabled text style for selection mode - */ - -EXPORT_API void ewk_settings_text_style_state_enabled_set(Ewk_Settings *settings, Eina_Bool enabled); -/** - * Gets text style for selection mode enabled. - * - * @param settings settings object - * - * @return @c EINA_TRUE if text style for selection mode enabled, @c EINA_FALSE otherwise - */ -EXPORT_API Eina_Bool ewk_settings_text_style_state_enabled_get(const Ewk_Settings *settings); - -/** * Requests to enable/disable to select word by double tap * * @param settings settings object to enable/disable to select word by double tap @@ -585,22 +561,6 @@ ewk_settings_tizen_compatibility_mode_set(Ewk_Settings* settings, unsigned minor, unsigned release); -/* - * Enables/disables swipe to refresh feature. Swipe to refresh allows - * us to refresh page using swipe gesture. - * - * Default value for swipe to refresh setting is @c EINA_FALSE. - * - * @param settings settings object to enable swipe to refresh feature - * @param enable @c EINA_TRUE to enable swipe to refresh feature or - * @c EINA_FALSE to disable - * - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure - */ -EXPORT_API Eina_Bool -ewk_settings_swipe_to_refresh_enabled_set(Ewk_Settings* settings, - Eina_Bool enable); - #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings_product.h b/tizen_src/ewk/efl_integration/public/ewk_settings_product.h index 568e437..7f6bdfa 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_settings_product.h @@ -238,22 +238,26 @@ EXPORT_API Eina_Bool ewk_settings_scan_malware_enabled_get(const Ewk_Settings* s /** * Requests to enable/disable spdy. * + * @deprecated Deprecated since Tizen 4.0. + * * @param settings param not needed, only present for API compatibility * * @param spdy_enabled @c EINA_TRUE to enable the spdy @c EINA_FALSE to disable * * @return always @c EINA_TRUE, only present for API compatibility */ -EXPORT_API Eina_Bool ewk_settings_spdy_enabled_set(Ewk_Settings *settings, Eina_Bool spdy_enabled); +EINA_DEPRECATED EXPORT_API Eina_Bool ewk_settings_spdy_enabled_set(Ewk_Settings *settings, Eina_Bool spdy_enabled); /** * Get spdy enabled/disabled state. * + * @deprecated Deprecated since Tizen 4.0. + * * @param settings param not needed, only present for API compatibility * * @return @c EINA_TRUE if enabled or @c EINA_FALSE if disabled */ -EXPORT_API Eina_Bool ewk_settings_spdy_enabled_get(Ewk_Settings *settings); +EINA_DEPRECATED EXPORT_API Eina_Bool ewk_settings_spdy_enabled_get(Ewk_Settings *settings); /** * Requests to set the performance features of soup enable/disable. @@ -396,6 +400,16 @@ EINA_DEPRECATED EXPORT_API void ewk_settings_focus_ring_enabled_set(Ewk_Settings EXPORT_API Eina_Bool ewk_settings_viewport_meta_tag_set(Ewk_Settings *settings, Eina_Bool enable); /** + * Returns whether the viewport meta tag is enabled. + * + * @param settings settings object + * + * @return @c EINA_TRUE if the viewport meta tag is enabled + * @c EINA_FALSE if not or on failure + */ +EXPORT_API Eina_Bool ewk_settings_viewport_meta_tag_get(const Ewk_Settings *settings); + +/** * Allow/disallow to run and display mixed contents. * * By default, WebCore don't allow run and display mixed contents. @@ -424,16 +438,6 @@ EXPORT_API void ewk_settings_default_mixed_contents_policy_set(Ewk_Settings* set EXPORT_API void ewk_settings_disable_webgl_set(Ewk_Settings* settings, Eina_Bool disable); /** - * Returns whether the viewport meta tag is enabled. - * - * @param settings settings object - * - * @return @c EINA_TRUE if the viewport meta tag is enabled - * @c EINA_FALSE if not or on failure - */ -EXPORT_API Eina_Bool ewk_settings_viewport_meta_tag_get(const Ewk_Settings *settings); - -/** * Enables/disables web security. * * By default, the web security is enabled. @@ -790,17 +794,81 @@ EXPORT_API Eina_Bool ewk_settings_selection_handle_enabled_get(const Ewk_Setting EXPORT_API void ewk_settings_disclose_set_cookie_headers_enabled(Ewk_Settings* settings, Eina_Bool Enabled); /** +* @brief Request to set the spatial navigation usage set by hbbtv +* +* @since_tizen 3.0 +* +* @param[in] settings setting object +* @param[in] enable @c EINA_TRUE enable to use spatial navigation +* @c EINA_FALSE to disable +*/ +EXPORT_API void ewk_settings_spatial_navigation_enabled_set(Ewk_Settings* settings, Eina_Bool enable); + +/** * Request to set enable/disable the ime panel * - * By default, the ime panel is Enabled + * By default, the ime panel is enabled * Some Apps want to disable ime panel * * @param settings setting object - * @param Enabled @c EINA_TRUE to enable ime panel + * @param enabled @c EINA_TRUE to enable ime panel * @c EINA_FALSE to disable ime panel * */ -EXPORT_API void ewk_settings_ime_panel_enabled_set(Ewk_Settings* settings, Eina_Bool Enabled); +EXPORT_API void ewk_settings_ime_panel_enabled_set(Ewk_Settings* settings, Eina_Bool enabled); + +/** + * Returns whether the ime panel is enabled or disabled + * + * @param settings setting object + * + * @return @c EINA_TRUE enable ime panel or @c EINA_FALSE disable ime panel + */ +EXPORT_API Eina_Bool ewk_settings_ime_panel_enabled_get(const Ewk_Settings *settings); + + +/** + * Request to set enable/disable drag and drop + * + * By default, the drag and drop is Disabled + * + * @param settings settings object + * @param enabled @c EINA_TRUE to enable drag and drop + * @c EINA_FALSE to disable drag and drop + * + */ +EXPORT_API void ewk_settings_drag_drop_enabled_set(Ewk_Settings* settings, Eina_Bool enabled); + +/** + * Returns whether drag and drop is enabled or disabled + * + * @param settings settings object + * + * @return @c EINA_TRUE drag and drop is enabled, @c EINA_FALSE drag and drop is disabled +*/ +EXPORT_API Eina_Bool ewk_settings_drag_drop_enabled_get(const Ewk_Settings* settings); + +/** + * Request to set enable/disable clipboard + * + * By default, the clipboard is Disabled + * + * @param settings settings object + * @param enabled @c EINA_TRUE to enable clipboard + * @c EINA_FALSE to disable clipboard + * + */ +EXPORT_API void ewk_settings_clipboard_enabled_set(Ewk_Settings* settings, Eina_Bool enabled); + +/** + * Returns whether clipboard is enabled + * + * @param settings settings object + * + * @return @c EINA_TRUE clipboard is enabled, @c EINA_FALSE clipboard is disabled +*/ +EXPORT_API Eina_Bool ewk_settings_clipboard_enabled_get(const Ewk_Settings* settings); + #ifdef __cplusplus } diff --git a/tizen_src/ewk/efl_integration/public/ewk_user_media.cc b/tizen_src/ewk/efl_integration/public/ewk_user_media.cc index 43aa4d4..226090a 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_user_media.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_user_media.cc @@ -25,6 +25,7 @@ #include "ewk_user_media_internal.h" +#include "private/ewk_private.h" #include "private/ewk_security_origin_private.h" #include "private/ewk_user_media_private.h" @@ -61,3 +62,15 @@ const Ewk_Security_Origin* ewk_user_media_permission_request_origin_get( return nullptr; #endif } + +const char* ewk_user_media_permission_request_message_get(const Ewk_User_Media_Permission_Request* request) +{ + LOG_EWK_API_MOCKUP(); + return NULL; +} + +Ewk_User_Media_Device_Type ewk_user_media_permission_request_device_type_get(const Ewk_User_Media_Permission_Request* request) +{ + LOG_EWK_API_MOCKUP(); + return EWK_USER_MEDIA_DEVICE_TYPE_NONE; +} diff --git a/tizen_src/ewk/efl_integration/public/ewk_user_media_internal.h b/tizen_src/ewk/efl_integration/public/ewk_user_media_internal.h index b7cc216..20ad24d 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_user_media_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_user_media_internal.h @@ -37,6 +37,23 @@ extern "C" { typedef struct _Ewk_User_Media_Permission_Request Ewk_User_Media_Permission_Request; /** + * enum _Ewk_User_Media_Device_Type + * @brief Contains device type option for media permission request + * + */ +enum _Ewk_User_Media_Device_Type { + EWK_USER_MEDIA_DEVICE_TYPE_NONE = 0, + EWK_USER_MEDIA_DEVICE_TYPE_MICROPHONE = 1, /* MicroPhone type */ + EWK_USER_MEDIA_DEVICE_TYPE_CAMERA = 2, /* Camera type */ + EWK_USER_MEDIA_DEVICE_TYPE_MICROPHONE_AND_CAMERA = 3 /* Both MicroPhone and Camera. */ +}; + +/** + * @brief The enum type that creates a type name for _Ewk_User_Media_Device_Type. + */ +typedef enum _Ewk_User_Media_Device_Type Ewk_User_Media_Device_Type; + +/** * Requests for getting origin of local media permission request. * * @param request Ewk_User_Media_Permission_Request object to get origin for @@ -73,6 +90,26 @@ EXPORT_API Eina_Bool ewk_user_media_permission_request_suspend(Ewk_User_Media_Pe */ EXPORT_API void ewk_user_media_permission_reply(Ewk_User_Media_Permission_Request* request, Eina_Bool allow); +/** + * Requests for getting message of local media permission request. + * + * @param request Ewk_User_Media_Permission_Request object to get message for + * userMedia permission request + * + * @return message of userMedia permission request + */ +EXPORT_API const char* ewk_user_media_permission_request_message_get(const Ewk_User_Media_Permission_Request* request); + +/** + * Get the type of device type for media permission request message. + * + * @param request Ewk_User_Media_Permission_Request object to get message for + * userMedia permission request + * + * @return The type of device type, MicroPhone, Camera, or both of them. + */ +EXPORT_API Ewk_User_Media_Device_Type ewk_user_media_permission_request_device_type_get(const Ewk_User_Media_Permission_Request* request); + #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.cc b/tizen_src/ewk/efl_integration/public/ewk_view.cc index 9ab82e1..f0033ba 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_view.cc @@ -707,8 +707,8 @@ void ewk_view_orientation_send(Evas_Object* ewkView, int orientation) void ewk_view_encoding_custom_set(Evas_Object* ewkView, const char* encoding) { - EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl); - impl->SetOverrideEncoding(std::string(encoding)); + // Chromium does not support this feature hence the comment + LOG_EWK_API_MOCKUP("Not Supported by chromium"); } Eina_Bool ewk_view_text_selection_range_get(const Evas_Object* view, Eina_Rectangle* left_rect, Eina_Rectangle* right_rect) @@ -897,11 +897,6 @@ void ewk_view_exceeded_local_file_system_quota_reply(Evas_Object* ewkView, Eina_ LOG_EWK_API_MOCKUP(); } -void ewk_view_intercept_request_callback_set (Evas_Object* ewkView, Ewk_View_Intercept_Request_Callback callback, void* user_data) -{ - LOG_EWK_API_MOCKUP(); -} - void ewk_view_unfocus_allow_callback_set(Evas_Object* ewkView, Ewk_View_Unfocus_Allow_Callback callback, void* user_data) { EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl); @@ -1336,11 +1331,6 @@ void ewk_view_force_layout(const Evas_Object* o) LOG_EWK_API_MOCKUP(); } -void ewk_media_current_time_get(const Evas_Object* o, Ewk_View_Video_Current_Time_Get_Callback callback, void *user_data) -{ - LOG_EWK_API_MOCKUP(); -} - Eina_Bool ewk_view_send_key_event(Evas_Object* ewk_view, void* key_event, Eina_Bool is_press) { LOG_EWK_API_MOCKUP(); return false; @@ -1392,3 +1382,115 @@ Eina_Bool ewk_view_app_preload_set(Evas_Object* ewkView, Eina_Bool is_preload) { LOG_EWK_API_MOCKUP(); return false; } + +const char* ewk_view_original_url_get(const Evas_Object* o) +{ + LOG_EWK_API_MOCKUP(); + return NULL; +} + +void ewk_view_offscreen_rendering_enabled_set(Evas_Object* o, Eina_Bool enabled) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_ime_window_set(Evas_Object* o, void* window) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_smartrc_show_mic_notification_callback_set(Evas_Object* o, Ewk_View_SmartRC_Mic_Notification_Callback callback, void* user_data) +{ + LOG_EWK_API_MOCKUP(); +} + +Eina_Bool ewk_view_set_support_canvas_hole(Evas_Object* ewkView, const char* url) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_view_marlin_enable_set(Evas_Object* ewkView, Eina_Bool is_enable) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_view_key_system_whitelist_set(Evas_Object* ewkView, const char** list, unsigned list_size) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +Eina_Bool ewk_view_active_drm_set(Evas_Object* view, const char* drm_system_id) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +void ewk_media_set_subtitle_lang(Evas_Object* ewkView, const char* lang_list) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_media_set_parental_rating_result(Evas_Object* ewkView, const char* url, Eina_Bool is_pass) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_media_start_with_high_bit_rate(Evas_Object* ewkView, Eina_Bool is_high_bitrate) +{ + LOG_EWK_API_MOCKUP(); +} + +double ewk_view_media_current_time_get(const Evas_Object *o) +{ + LOG_EWK_API_MOCKUP(); + return 0; +} + +void ewk_view_request_canvas_fullscreen(Evas_Object* ewkView) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_360video_play(Evas_Object* ewkView) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_360video_pause(Evas_Object* ewkView) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_360video_duration(Evas_Object* ewkView, Ewk_360_Video_Duration_Callback callback, void* user_data) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_360video_current_time(Evas_Object* ewkView, Ewk_360_Video_CurrentTime_Callback callback, void* user_data) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_360video_set_current_time(Evas_Object* ewkView, double current_time) +{ + LOG_EWK_API_MOCKUP(); +} + +Eina_Bool ewk_view_script_execute_all_frames(Evas_Object *o, const char *script, Ewk_View_Script_Execute_Cb callback, void *user_data) +{ + LOG_EWK_API_MOCKUP(); + return EINA_FALSE; +} + +void ewk_view_floating_window_state_changed(const Evas_Object *o, Eina_Bool status) +{ + LOG_EWK_API_MOCKUP(); +} + +void ewk_view_auto_login(Evas_Object *view, const char* user_name, const char* password) +{ + LOG_EWK_API_MOCKUP(); +} diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.h b/tizen_src/ewk/efl_integration/public/ewk_view.h index db2177f..d637a51 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.h +++ b/tizen_src/ewk/efl_integration/public/ewk_view.h @@ -55,7 +55,7 @@ extern "C" { * @param[in] enable EINA_TRUE to set on the visibility of the page, * EINA_FALSE otherwise. * - * @return @c EINA_TRUE on success, othetwise @c EINA_FALSE + * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE */ EXPORT_API Eina_Bool ewk_view_visibility_set(Evas_Object* o, Eina_Bool enable); @@ -173,6 +173,21 @@ EXPORT_API Eina_Bool ewk_view_url_set(Evas_Object* o, const char* url); EXPORT_API const char* ewk_view_url_get(const Evas_Object* o); /** + * @brief Returns the original URL string of the view object. + * + * @details It returns an internal string that should not be modified.\n + * The string is guaranteed to be stringshared. + * + * @since_tizen 4.0 + * + * @param[in] o The view object to get the original URL + * + * @return The original URL on success,\n + * otherwise @c NULL on failure + */ +EXPORT_API const char* ewk_view_original_url_get(const Evas_Object* o); + +/** * @brief Asks the main frame to reload the current document. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -231,6 +246,7 @@ EXPORT_API Eina_Bool ewk_view_back(Evas_Object* o); * otherwise @c EINA_FALSE */ EXPORT_API Eina_Bool ewk_view_forward(Evas_Object* o); + /** * @brief Checks whether it is possible to navigate backwards one item in * history. @@ -365,7 +381,7 @@ EXPORT_API Eina_Bool ewk_view_contents_size_get(const Evas_Object* o, Evas_Coord * @param[in] result_value The value returned by the script\n * If executed script returns a value, it would be @a result_value,\n * otherwise @c NULL if there is no value returned by the script - * @param[in] user_data The user_data will be passsed when + * @param[in] user_data The user_data will be passed when * ewk_view_script_execute() is called */ typedef void (*Ewk_View_Script_Execute_Cb)(Evas_Object* o, const char* result_value, void* user_data); @@ -640,7 +656,7 @@ typedef struct _Ewk_Script_Message Ewk_Script_Message; * * @param[in] o The view object * @param[in] message The ScriptMessage returned by the script. \n - * It will be passsed when ewk_view_javascript_message_handler_add() is called. + * It will be passed when ewk_view_javascript_message_handler_add() is called. */ typedef void (*Ewk_View_Script_Message_Cb)(Evas_Object* o, Ewk_Script_Message message); @@ -649,7 +665,10 @@ typedef void (*Ewk_View_Script_Message_Cb)(Evas_Object* o, Ewk_Script_Message me * * @since_tizen 3.0 * - * @remarks Certainly, specify privileges of using native API to users, + * @remarks Note that injected objects will not appear in JavaScript + * until the page is next (re)loaded. + * + * Certainly, specify privileges of using native API to users, * if using native API affects system settings, stability or security. * Privilege display name & description which will be noticed to user. * @@ -677,6 +696,30 @@ EXPORT_API Eina_Bool ewk_view_javascript_message_handler_add(Evas_Object* o, Ewk EXPORT_API Eina_Bool ewk_view_evaluate_javascript(Evas_Object* o, const char* name, const char* result); /** + * @brief Requests to set or unset a web view as the currently focused one. + * + * @since_tizen 3.0 + * + * @param[in] o The view object. + * @param[in] focused @c EINA_TRUE to set the focus on the web view, + * @c EINA_FALSE to remove the focus from the web view. + * + * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE + */ +EXPORT_API Eina_Bool ewk_view_focus_set(const Evas_Object* o, Eina_Bool focused); + +/** + * @brief Checks whether a web view has the focus. + * + * @since_tizen 3.0 + * + * @param[in] o The view object. + * + * @return @c EINA_TRUE if the web view has the focus, otherwise @c EINA_FALSE + */ +EXPORT_API Eina_Bool ewk_view_focus_get(const Evas_Object* o); + +/** * @brief Callback invoked when requested manifest inform is responded. * * @since_tizen 3.0 @@ -706,40 +749,9 @@ typedef void (*Ewk_View_Request_Manifest_Callback)(Evas_Object* o, Ewk_View_Requ EXPORT_API void ewk_view_request_manifest(Evas_Object* o, Ewk_View_Request_Manifest_Callback callback, void* user_data); /** - * @brief Requests to set or unset a web view as the currently focused one. - * - * @since_tizen 3.0 - * - * @param[in] o The view object. - * @param[in] focused @c EINA_TRUE to set the focus on the web view, - * @c EINA_FALSE to remove the focus from the web view. - * - * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE - */ -EXPORT_API Eina_Bool ewk_view_focus_set(const Evas_Object* o, Eina_Bool focused); - -#if defined(TIZEN_VIDEO_HOLE) -/** - * @brief Sets the support of video hole and video window, Use H/W overlay for - * performance of video output - * - * @since_tizen 3.0 - * - * @param[in] o the view object - * @param[in] o the top-level window object - * @param[in] enable EINA_TRUE to set on support the video hole, - * EINA_FALSE otherwise - * @param[in] enable EINA_TRUE to set on the video window of video hole, - * EINA_FALSE to set on the video windowless of video hole - * - * @return return @c EINA_TRUE on success or @c EINA_FALSE on failure - */ -EXPORT_API Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, Evas_Object* window, Eina_Bool enable, Eina_Bool isVideoWindow); -#endif - -/** * @} */ + #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_view_internal.h b/tizen_src/ewk/efl_integration/public/ewk_view_internal.h index 41d52ee..05d81a1 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_view_internal.h @@ -39,8 +39,8 @@ #include "ewk_enums_internal.h" #include "ewk_frame_internal.h" #include "ewk_geolocation_internal.h" -#include "ewk_hit_test_internal.h" #include "ewk_history_internal.h" +#include "ewk_hit_test_internal.h" #include "ewk_page_group_internal.h" #include "ewk_quota_permission_request_internal.h" #include "ewk_touch_internal.h" @@ -268,6 +268,17 @@ typedef Eina_Bool (*Ewk_View_Notification_Permission_Callback)(Evas_Object *o, E typedef void (*Ewk_View_Scale_Changed_Callback)(Evas_Object *o, double scale_factor, void *user_data); /** + * Defines a callback for show or hide the notification to user. + * + * @param o view object to register on scale change + * @param show bool flag to indicate whether to show the mic notification. + * show is true when bluetooth mic is opened or voice key is pressed shortly. + * show is false when voice key is hold for more than 500ms + * @param user_data a pointer to data specified by ewk_view_smartrc_show_mic_notification_callback_set + */ +typedef void (*Ewk_View_SmartRC_Mic_Notification_Callback)(Evas_Object *o, Eina_Bool show, void *user_data); + +/** * The version you have to put into the version field * in the @a Ewk_View_Smart_Class structure. */ @@ -517,25 +528,6 @@ EXPORT_API void ewk_view_vertical_panning_hold_set(Evas_Object* o, Eina_Bool hol */ EXPORT_API void ewk_view_scale_range_get(Evas_Object* o, double* min_scale, double* max_scale); -/** - * Gets the current text zoom level. - * - * @param o view object to get the zoom level - * - * @return current zoom level in use on success or @c -1.0 on failure - */ -EXPORT_API double ewk_view_text_zoom_get(const Evas_Object* o); - -/** - * Sets the current text zoom level. - * - * @param o view object to set the zoom level - * @param textZoomFactor a new level to set - * - * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise - */ -EXPORT_API Eina_Bool ewk_view_text_zoom_set(Evas_Object* o, double text_zoom_factor); - typedef Eina_Bool (*Ewk_View_Password_Confirm_Popup_Callback)(Evas_Object* o, const char* message, void* user_data); EXPORT_API void ewk_view_password_confirm_popup_callback_set(Evas_Object* o, Ewk_View_Password_Confirm_Popup_Callback callback, void* user_data); EXPORT_API void ewk_view_password_confirm_popup_reply(Evas_Object* o, Ewk_Password_Popup_Option result); @@ -572,7 +564,7 @@ EXPORT_API void ewk_view_javascript_prompt_callback_set(Evas_Object* o, Ewk_View typedef Eina_Bool (*Ewk_View_Applicacion_Cache_Permission_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, void* user_data); //#endif -typedef Eina_Bool (*Ewk_View_Exceeded_Indexed_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data); +typedef void (*Ewk_View_Exceeded_Indexed_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data); EXPORT_API void ewk_view_exceeded_indexed_database_quota_callback_set(Evas_Object* o, Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback, void* user_data); EXPORT_API void ewk_view_exceeded_indexed_database_quota_reply(Evas_Object* o, Eina_Bool allow); @@ -851,12 +843,13 @@ EXPORT_API Eina_Bool ewk_view_hit_test_request(Evas_Object* o, int x, int y, int EINA_DEPRECATED EXPORT_API Eina_Bool ewk_view_notification_closed(Evas_Object* o, Eina_List* notification_list); /** + * @deprecated Deprecated since Tizen 5.0. Manual encoding selection is removed from upstream * Sets the encoding and reloads the page. * * @param ewkView view to set the encoding * @param encoding the new encoding to set or @c 0 to restore the default one */ -EXPORT_API void ewk_view_encoding_custom_set(Evas_Object* ewkView, const char* encoding); +EINA_DEPRECATED EXPORT_API void ewk_view_encoding_custom_set(Evas_Object* ewkView, const char* encoding); // #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION) @@ -1085,6 +1078,11 @@ EXPORT_API double ewk_view_page_zoom_get(const Evas_Object *o); /** * Sets zoom factor of the current page. * + * @note ewk_view_page_zoom_set internally might use older page than current + * one, if you called it immediately after ewk_view_url_set. To be safe + * from such race, use it from inside 'url,changed' callback, which can + * be registered on ewk_view. + * * @param o view object to set the zoom level * @param zoom_factor a new level to set * @@ -1386,6 +1384,26 @@ EXPORT_API void ewk_view_app_installation_request_callback_set(Evas_Object* o, E */ EXPORT_API void ewk_view_mirrored_blur_set(Evas_Object* o, Eina_Bool state); +/** + * Sets whether the ewk_view renders to offscreen buffer or not. + * + * @since_tizen 5.0 + * + * @param[in] o view object + * @param[in] enabled a state to set + */ +EXPORT_API void ewk_view_offscreen_rendering_enabled_set(Evas_Object* o, Eina_Bool enabled); + +/** + * Sets the window object which is used for IME. + * + * @since_tizen 5.5 + * + * @param[in] o view object + * @param[in] window the top-level window object + */ +EXPORT_API void ewk_view_ime_window_set(Evas_Object* o, void* window); + #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_view_product.h b/tizen_src/ewk/efl_integration/public/ewk_view_product.h index 382bb89..cd9ceae 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_view_product.h @@ -37,10 +37,6 @@ #include "ewk_value_product.h" #include "ewk_view_internal.h" -#if defined(TIZEN_PEPPER_EXTENSIONS) -#include "ewk_value_product.h" -#endif - #ifdef __cplusplus extern "C" { #endif @@ -175,6 +171,18 @@ EXPORT_API void ewk_view_application_cache_permission_reply(Evas_Object* o, Eina EXPORT_API void ewk_view_unfocus_allow_callback_set(Evas_Object* o, Ewk_View_Unfocus_Allow_Callback callback, void* user_data); /** + * @brief Set to callback to show or hide the notification of bluetooth mic to user. + * + * @since_tizen 5.0 + * + * @param[in] o view object + * @param[in] callback to show or hide the notification + * @param[in] user_data user_data will be passed when result_callback is + * called\n -I.e., user data will be kept until callback is called + */ +EXPORT_API void ewk_view_smartrc_show_mic_notification_callback_set(Evas_Object* o, Ewk_View_SmartRC_Mic_Notification_Callback callback, void* user_data); + +/** * @brief Requests loading the given contents. * * @since_tizen 2.3 @@ -503,7 +511,7 @@ EXPORT_API Evas_Object* ewk_view_favicon_get(const Evas_Object* ewkView); * @param item view object to resume new url loading * */ -EXPORT_API void ewk_view_resume_network_loading(Evas_Object* item); +EXPORT_API void ewk_view_resume_network_loading(Evas_Object* ewkView); EXPORT_API void ewk_view_poweroff_suspend(Evas_Object *item); @@ -513,7 +521,7 @@ EXPORT_API void ewk_view_poweroff_suspend(Evas_Object *item); * @param item view object to suspend url loading * */ -EXPORT_API void ewk_view_suspend_network_loading(Evas_Object* item); +EXPORT_API void ewk_view_suspend_network_loading(Evas_Object* ewkView); /** * This function should be use for browser edge scroll. @@ -546,10 +554,10 @@ EXPORT_API void ewk_view_set_cursor_by_client(Evas_Object* ewkView, Eina_Bool en EXPORT_API void ewk_view_run_mixed_content_confirm_reply(Evas_Object* ewkView, Eina_Bool result); /** - * Sets the cover-area (soon rect) multiplier. + * Sets the cover-area (soon rect) multiplier. * * @param ewkView view object - * @param coverAreaMultiplier the multiplier of cover-area. + * @param cover_area_multiplier the multiplier of cover-area. */ EXPORT_API void ewk_view_tile_cover_area_multiplier_set( Evas_Object* ewkView, @@ -623,39 +631,20 @@ EXPORT_API Eina_Bool ewk_view_stop_video(Evas_Object* o, Ewk_Stop_Video_Callback EXPORT_API Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, Evas_Object* window, Eina_Bool enable, Eina_Bool isVideoWindow); /** - * @brief Sets the support of 4K video, Customize the device pixel ratio for - * video plane. + * @brief Sets the support of canvas hole, Use H/W overlay for video quality of WebGL 360 degree. + * Also, The WebBrowser provisionally want to show plane 360 video through canvas hole. * * @since_tizen 3.0 * * @note Should be used after ewk_view_url_set(). * * @param[in] o the view object - * @param[in] o enabled a state to set + * @param[in] url string (ex. "youtube.com") * * @return return @c EINA_TRUE on success or @c EINA_FALSE on failure */ -EXPORT_API Eina_Bool ewk_view_set_custom_device_pixel_ratio(Evas_Object* ewkView, Eina_Bool enabled); - -/** - * @brief Gets whether vertical panning is holding. - * - * @since_tizen 2.3 - * - * @param[in] o view object to get whether vertical panning is holding - * - * @return @c EINA_TRUE if vertical panning is holding - * @c EINA_FALSE if not or on failure - */ -EXPORT_API Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* o); +EXPORT_API Eina_Bool ewk_view_set_support_canvas_hole(Evas_Object* ewkView, const char* url); -/** - * Block/Release the vertical pan - * - * @param o view object on which pan is to be blocked/release - * @param hold status of pan - */ -EXPORT_API void ewk_view_vertical_panning_hold_set(Evas_Object* o, Eina_Bool hold); /** * Callback for the generic sync call. @@ -688,7 +677,64 @@ EXPORT_API void ewk_view_widget_pepper_extension_callback_set(Evas_Object* ewk_v */ EXPORT_API void ewk_view_widget_pepper_extension_info_set(Evas_Object* ewk_view, Ewk_Value widget_pepper_ext_info); -#if defined(OS_TIZEN_TV) +/** + * @brief Sets the support of 4K video, Customize the device pixel ratio for + * video plane. + * + * @since_tizen 3.0 + * + * @note Should be used after ewk_view_url_set(). + * + * @param[in] o the view object + * @param[in] o enabled a state to set + * + * @return return @c EINA_TRUE on success or @c EINA_FALSE on failure + */ +EXPORT_API Eina_Bool ewk_view_set_custom_device_pixel_ratio(Evas_Object* ewkView, Eina_Bool enabled); + +/** + * @brief Gets whether horizontal panning is holding. + * + * @since_tizen 2.3 + * + * @param[in] o view object to get whether horizontal panning is holding + * + * @return @c EINA_TRUE if horizontal panning is holding + * @c EINA_FALSE if not or on failure + */ +EXPORT_API Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* o); + +/** + * @brief Sets to hold horizontal panning. + * + * @since_tizen 2.3 + * + * @param[in] o view object to set to hold horizontal panning + * @param[in] hold @c EINA_TRUE to hold horizontal panning + * @c EINA_FALSE not to hold + */ +EXPORT_API void ewk_view_horizontal_panning_hold_set(Evas_Object* o, Eina_Bool hold); + +/** + * @brief Gets whether vertical panning is holding. + * + * @since_tizen 2.3 + * + * @param[in] o view object to get whether vertical panning is holding + * + * @return @c EINA_TRUE if vertical panning is holding + * @c EINA_FALSE if not or on failure + */ +EXPORT_API Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* o); + +/** + * Block/Release the vertical pan + * + * @param o view object on which pan is to be blocked/release + * @param hold status of pan + */ +EXPORT_API void ewk_view_vertical_panning_hold_set(Evas_Object* o, Eina_Bool hold); + /** * Set the translated url to media player. * @@ -698,7 +744,6 @@ EXPORT_API void ewk_view_widget_pepper_extension_info_set(Evas_Object* ewk_view, * @return @c EINA_TRUE on success or @c EINA_FALSE on failure */ EXPORT_API Eina_Bool ewk_media_translated_url_set(Evas_Object* ewkView, const char* url); -#endif /** * Set app is preload type or not. @@ -711,6 +756,69 @@ EXPORT_API Eina_Bool ewk_media_translated_url_set(Evas_Object* ewkView, const ch EXPORT_API Eina_Bool ewk_view_app_preload_set(Evas_Object* ewkView, Eina_Bool is_preload); /** +* Set app enable marlin or not. +* +* @param ewkView view object +* @param is_enable if app enable marlin drm +* +* @return @c EINA_TRUE on success or @c EINA_FALSE on failure +*/ +EXPORT_API Eina_Bool ewk_view_marlin_enable_set(Evas_Object* ewkView, Eina_Bool is_enable); + +/** + * Sets whitelisted DRM key systems. Passed key systems will be available + * through EME. Other systems even if available in the platform will be + * unavailable through EME + * + * @param ewkView View object + * @param list Key system names + * @param list_size Key system count + */ +EXPORT_API Eina_Bool ewk_view_key_system_whitelist_set(Evas_Object* ewkView, + const char** list, + unsigned list_size); + +/** + * Sets the active DRM system identifier as provided by the HbbTV application. + * + * @param ewkView View object + * @param drm_system_id Identifier of requested DRM system + * + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure + */ +EXPORT_API Eina_Bool ewk_view_active_drm_set(Evas_Object* view, const char* drm_system_id); + +/** +* Set the selected text track language to media player. +* +* @param ewkView view object +* @param lang_list comma separated three_digit_language code. (For example "eng,deu") +* +*/ +EXPORT_API void ewk_media_set_subtitle_lang(Evas_Object* ewkView, const char* lang_list); + + +/** +* Set parental rating result to media player. +* +* @param ewkView view object +* @param url media url +* @param is_pass authentication result true/false +* +*/ +EXPORT_API void ewk_media_set_parental_rating_result(Evas_Object* ewkView, const char* url, Eina_Bool is_pass); + +/** +* Set the if use high bit rate to media player. +* +* @param ewkView view object +* @param is_high if app use high bit rate +* +*/ +EXPORT_API void ewk_media_start_with_high_bit_rate(Evas_Object* ewkView, Eina_Bool is_high_bitrate); + + +/** * @brief Sends key event. * * @since_tizen 2.4 @@ -958,47 +1066,64 @@ EXPORT_API void ewk_view_add_dynamic_certificate_path(const Evas_Object *ewkView * @param[in] o View object to set the atk use. * @param[in] enable EINA_TRUE to set on the atk use. * EINA_FALSE makes atk not to use, but app use WebSpeech instead of ATK. - * The default value is EINA_FALSE. */ EXPORT_API void ewk_view_atk_deactivation_by_app(Evas_Object* view, Eina_Bool enable); -/* - * Get cookies associated with an URL. +typedef enum { + EWK_TTS_MODE_DEFAULT = 0, /**< Default mode for normal application */ + EWK_TTS_MODE_NOTIFICATION = 1, /**< Notification mode(it has same behavior with EWK_TTS_MODE_DEFAULT. not supported in vd) */ + EWK_TTS_MODE_SCREEN_READER = 2 /**< Accessibiliity mode(TTS works only for accessibility mode) */ +} ewk_tts_mode; + +/** + * @brief Sets tts mode + * up to tizen 4.0(in VD), default tts mode is EWK_TTS_MODE_SCREEN_READER. + * so TTS api disabled when accessibility mode turn off. + * this api provided to use tts api in none accessibility mode + * (tts mode decided in chromium's init time. so it should be called in init time) + * tts mode affect to below web apis + * speech_syntesis * - * @param o view object in which URL is opened. - * @param url the url for which cookies needs to be obtained. + * @since_tizen 4.0 @if TV @endif * - * @return @c character array containing cookies, @c NULL if no cookies are found. + * @param[in] o View object to set. + * @param[in] ewk_tts_mode. * - * The return character array has to be owned by the application and freed when not required. */ -EXPORT_API char* ewk_view_cookies_get(Evas_Object* o, const char* url); +EXPORT_API Eina_Bool ewk_view_tts_mode_set(Evas_Object* view, ewk_tts_mode tts_mode); /** - * @brief To give a chance to intercept request data before sending it. + * remove custom header * - * @since_tizen 2.3 + * @param o view object to remove custom header * - * @param[in] o view object to intercept request - * @param[in] intercept_request Defined structure to notify requesting infomation - * @param[in] user_data user data + * @param name custom header name to remove the custom header * - * @see ewk_view_intercept_request_callback_set() + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure */ -typedef void (*Ewk_View_Intercept_Request_Callback)(Evas_Object* o, Ewk_Intercept_Request* intercept_request, void* user_data); +EXPORT_API Eina_Bool ewk_view_custom_header_remove(const Evas_Object* o, const char* name); /** - * @brief To set Ewk_View_Intercept_Request_Callback to give a chance to intercept request data before sending it. + * Returns application name string. * - * @since_tizen 2.3 + * @param o view object to get the application name * - * @param[in] o view object to intercept request - * @param[in] callback Defined callback - * @param[in] user_data user data + * @return @c application name. The returned string @b should be freed by + * eina_stringshare_del() after use. + */ +EXPORT_API const char* ewk_view_application_name_for_user_agent_get(const Evas_Object* o); + +/* + * Get cookies associated with an URL. * - * @see Ewk_View_Intercept_Request_Callback + * @param o view object in which URL is opened. + * @param url the url for which cookies needs to be obtained. + * + * @return @c character array containing cookies, @c NULL if no cookies are found. + * + * The return character array has to be owned by the application and freed when not required. */ -EXPORT_API void ewk_view_intercept_request_callback_set (Evas_Object* o, Ewk_View_Intercept_Request_Callback callback, void* user_data); +EXPORT_API char* ewk_view_cookies_get(Evas_Object* o, const char* url); /** * @internal @@ -1082,23 +1207,13 @@ EXPORT_API Eina_Bool ewk_view_custom_encoding_set(Evas_Object* o, const char* en EXPORT_API void ewk_view_force_layout(const Evas_Object* o); /** -* Creates a type name for the callback function used to get video current time. -* -* @param o view object -* @param current time of the video -*@param user_data user data will be passed when ewk_media_current_time_get -*called -*/ -typedef void (*Ewk_View_Video_Current_Time_Get_Callback)(Evas_Object *o, double current_time, void *user_data); - -/** * Gets the video's timestamp. * * @param o view object to get the video's timestamp * * @return timestamp value */ -EXPORT_API void ewk_media_current_time_get(const Evas_Object* o, Ewk_View_Video_Current_Time_Get_Callback callback, void *user_data); +EXPORT_API double ewk_view_media_current_time_get(const Evas_Object *o); /** * @brief Enforces web page to close @@ -1112,6 +1227,79 @@ EXPORT_API void ewk_media_current_time_get(const Evas_Object* o, Ewk_View_Video_ EXPORT_API Eina_Bool ewk_view_page_close(Evas_Object* o); /** +* Clear all tile resources. +* +* @param ewkView view object +*/ +EXPORT_API void ewk_view_clear_all_tiles_resources(Evas_Object* ewkView); + +/** +* Request canvas to be shown in full-screen. +* +* @param ewkView view object +*/ +EXPORT_API void ewk_view_request_canvas_fullscreen(Evas_Object* ewkView); + +/** +* play 360 video in the view +* +* @param ewkView view object +*/ +EXPORT_API void ewk_view_360video_play(Evas_Object* ewkView); + +/** +* pause 360 video in the view +* +* @param ewkView view object +*/ +EXPORT_API void ewk_view_360video_pause(Evas_Object* ewkView); + +/** + * Callback for ewk_view_360video_duration + * + * @param o view object + * @param duration 360 video's duration + * @param user_data user_data will be passsed when ewk_view_360video_duration is called + */ +typedef void (*Ewk_360_Video_Duration_Callback)(Evas_Object* o, double duration, void* user_data); + +/** +* get duration of the 360 video in the view +* +* @param ewkView view object +* +* @return duration of the video +*/ +EXPORT_API void ewk_view_360video_duration(Evas_Object* ewkView, Ewk_360_Video_Duration_Callback callback, void* user_data); + +/** + * Callback for ewk_view_360video_current_time + * + * @param o view object + * @param current_time 360 video's current time + * @param user_data user_data will be passsed when ewk_view_360video_current_time is called + */ +typedef void (*Ewk_360_Video_CurrentTime_Callback)(Evas_Object* o, double current_time, void* user_data); + +/** +* get current time of the 360 video in the view +* +* @param ewkView view object +* +* @return current time of the video +*/ +EXPORT_API void ewk_view_360video_current_time(Evas_Object* ewkView, Ewk_360_Video_CurrentTime_Callback callback, void* user_data); + +/** +* set current time of the 360 video in the view +* +* @param ewkView view object +* +* @param current_time set current time +*/ +EXPORT_API void ewk_view_360video_set_current_time(Evas_Object* ewkView, double current_time); + +/** * @brief Request to set the atk usage set by web app(config.xml). * * Some TV apps use WebSpeech instead of use ATK for regulation U.S.FCC @@ -1125,48 +1313,38 @@ EXPORT_API Eina_Bool ewk_view_page_close(Evas_Object* o); */ EXPORT_API void ewk_view_atk_deactivation_by_app(Evas_Object* view, Eina_Bool enable); -typedef enum { - EWK_TTS_MODE_DEFAULT = 0, /**< Default mode for normal application */ - EWK_TTS_MODE_NOTIFICATION = 1, /**< Notification mode(it has same behavior - with EWK_TTS_MODE_DEFAULT. not supported in - vd) */ - EWK_TTS_MODE_SCREEN_READER = - 2 /**< Accessibiliity mode(TTS works only for accessibility mode) */ -} ewk_tts_mode; - /** - * @brief Sets tts mode - * up to tizen 4.0(in VD), default tts mode is EWK_TTS_MODE_SCREEN_READER. - * so TTS api disabled when accessibility mode turn off. - * this api provided to use tts api in none accessibility mode - * (tts mode decided in chromium's init time. so it should be called in init - * time) tts mode affect to below web apis speech_syntesis + * Requests execution of the given script in the main frame and subframes of the page. * - * @since_tizen 4.0 @if TV @endif + * The result value for the execution can be retrieved from the asynchronous callback. * - * @param[in] o View object to set. - * @param[in] ewk_tts_mode. + * @param o The view to execute script + * @param script JavaScript to execute + * @param callback The function to call when the execution is completed, may be @c NULL + * @param user_data User data, may be @c NULL * + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure */ -EXPORT_API Eina_Bool ewk_view_tts_mode_set(Evas_Object* view, ewk_tts_mode tts_mode); +EXPORT_API Eina_Bool ewk_view_script_execute_all_frames(Evas_Object *o, const char *script, Ewk_View_Script_Execute_Cb callback, void *user_data); /** - * @brief Request to set the spatial navigation usage set by hbbtv + * Floating video's window ON/OFF * - * @since_tizen 3.0 + * @param o view object + * @param bool status (true/false) * - * @param[in] settings setting object - * @param[in] enable @c EINA_TRUE enable to use spatial navigation - * @c EINA_FALSE to disable */ -EXPORT_API void ewk_settings_spatial_navigation_enabled_set(Ewk_Settings* settings, Eina_Bool Enabled); +EXPORT_API void ewk_view_floating_window_state_changed(const Evas_Object *o, Eina_Bool status); /** - * Clear all tile resources. + * Auto login by samsung pass + * + * @param view view object + * @param user_name user name to login + * @param password user password to login * - * @param ewkView view object */ -EXPORT_API void ewk_view_clear_all_tiles_resources(Evas_Object* ewkView); +EXPORT_API void ewk_view_auto_login(Evas_Object *view, const char* user_name, const char* password); /** * @}