#include "eweb_view.h"
#include "url/gurl.h"
-#include "tizen_webview/public/tw_content_security_policy.h"
-
namespace content{
class WebContents;
}
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ewk_enums.h"
+#include "public/ewk_context.h"
namespace content {
class BrowserContext;
#include "private/ewk_hit_test_private.h"
#include "private/ewk_text_style_private.h"
#include "private/ewk_wrt_private.h"
-#include "tizen_webview/public/tw_content_security_policy.h"
+#include "public/ewk_view.h"
#include "tizen_webview/public/tw_error.h"
#include "tizen_webview/public/tw_hit_test.h"
#include "tizen_webview/public/tw_settings.h"
IPC_STRUCT_TRAITS_MEMBER(domain)
IPC_STRUCT_TRAITS_END()
-IPC_ENUM_TRAITS(tizen_webview::ContentSecurityPolicyType)
+IPC_ENUM_TRAITS(Ewk_CSP_Header_Type)
IPC_ENUM_TRAITS(tizen_webview::Hit_Test_Mode)
IPC_ENUM_TRAITS(tizen_webview::Hit_Test_Result_Context)
IPC_MESSAGE_ROUTED2(EwkViewMsg_SetCSP,
std::string, /* policy */
- tizen_webview::ContentSecurityPolicyType /* header type */)
+ Ewk_CSP_Header_Type /* header type */)
IPC_SYNC_MESSAGE_ROUTED0_2(EwkHostMsg_GetContentSecurityPolicy,
std::string, /* policy */
- tizen_webview::ContentSecurityPolicyType /* header type */)
+ Ewk_CSP_Header_Type /* header type */)
IPC_MESSAGE_ROUTED3(EwkViewMsg_Scale,
double, /* scale factor */
#include <Eina.h>
-#include "tizen_webview/public/tw_cookie_accept_policy.h"
-
using content::BrowserThread;
using net::CookieList;
using net::CookieMonster;
namespace {
-void TriggerHostPolicyGetCallbackAsyncOnUIThread(tizen_webview::Cookie_Accept_Policy policy,
- CookieManager::AsyncPolicyGetCb callback,
+void TriggerHostPolicyGetCallbackAsyncOnUIThread(Ewk_Cookie_Accept_Policy policy,
+ Ewk_Cookie_Manager_Policy_Async_Get_Cb callback,
void *data) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (callback)
CookieManager::CookieManager()
: is_clearing_(false),
- cookie_policy_(TW_COOKIE_ACCEPT_POLICY_ALWAYS)
+ cookie_policy_(EWK_COOKIE_ACCEPT_POLICY_ALWAYS)
{
}
}
}
-void CookieManager::GetAcceptPolicyAsync(AsyncPolicyGetCb callback, void *data) {
+void CookieManager::GetAcceptPolicyAsync(Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void *data) {
AutoLock lock(lock_);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TriggerHostPolicyGetCallbackAsyncOnUIThread,
bool CookieManager::GetGlobalAllowAccess() {
AutoLock lock(lock_);
- if (TW_COOKIE_ACCEPT_POLICY_ALWAYS == cookie_policy_)
+ if (EWK_COOKIE_ACCEPT_POLICY_ALWAYS == cookie_policy_)
return true;
else
return false;
}
-void CookieManager::SetCookiePolicy(tizen_webview::Cookie_Accept_Policy policy) {
+void CookieManager::SetCookiePolicy(Ewk_Cookie_Accept_Policy policy) {
AutoLock lock(lock_);
cookie_policy_ = policy;
}
bool CookieManager::ShouldBlockThirdPartyCookies() {
AutoLock lock(lock_);
- if (TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY == cookie_policy_)
+ if (EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY == cookie_policy_)
return true;
else
return false;
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_options.h"
#include "net/cookies/cookie_util.h"
+#include "public/ewk_cookie_manager.h"
#include "url/gurl.h"
-#include "tizen_webview/public/tw_cookie_accept_policy.h"
namespace content {
class ResourceContext;
class CookieManager : public base::RefCountedThreadSafe<CookieManager> {
public:
- typedef void (*AsyncPolicyGetCb)(tizen_webview::Cookie_Accept_Policy,
- void *);
typedef void (*AsyncHostnamesGetCb)(Eina_List*, _Ewk_Error*, void *);
CookieManager();
bool persist_session_cookies,
bool file_storage_type=true);
//get the accept policy asynchronous
- void GetAcceptPolicyAsync(AsyncPolicyGetCb callback, void *data);
+ void GetAcceptPolicyAsync(Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void *data);
//get host name asynchronous
void GetHostNamesWithCookiesAsync(AsyncHostnamesGetCb callback, void *data);
// These manage the global access state shared across requests regardless of
// source (i.e. network or JavaScript).
bool GetGlobalAllowAccess();
- void SetCookiePolicy(tizen_webview::Cookie_Accept_Policy policy);
+ void SetCookiePolicy(Ewk_Cookie_Accept_Policy policy);
// These are the functions called when operating over cookies from the
// network. See NetworkDelegate for further descriptions.
bool OnCanGetCookies(const net::URLRequest& request,
base::WeakPtr<content::URLRequestContextGetterEfl> request_context_getter_;
//cookie policy information
base::Lock lock_;
- tizen_webview::Cookie_Accept_Policy cookie_policy_;
+ Ewk_Cookie_Accept_Policy cookie_policy_;
// This only mutates on the UI thread.
std::queue< EwkGetHostCallback* > host_callback_queue_;
'public/text_encoding_map_efl.h',
'tizen_webview/public/tw_settings.h',
- 'tizen_webview/public/tw_legacy_font_size_mode.h',
- 'tizen_webview/public/tw_find_options.h',
'tizen_webview/public/tw_context_menu_controller.cc',
'tizen_webview/public/tw_policy_decision.cc',
'tizen_webview/public/tw_touch_point.h',
'tizen_webview/public/tw_webview_delegate.cc',
- 'tizen_webview/public/tw_touch_event.h',
'tizen_webview/public/tw_callbacks.h',
'tizen_webview/public/tw_webview_delegate.h',
'tizen_webview/public/tw_context_menu_controller.h',
'tizen_webview/public/tw_webview.cc',
'tizen_webview/public/tw_web_context.cc',
'tizen_webview/public/tw_error.h',
- 'tizen_webview/public/tw_content_security_policy.h',
- 'tizen_webview/public/tw_cookie_accept_policy.h',
'tizen_webview/public/tw_policy_decision.h',
'tizen_webview/public/tw_touch_point.cc',
#include "base/memory/scoped_ptr.h"
#include "browser/web_cache_efl/web_cache_manager_efl.h"
#include "private/ewk_cookie_manager_private.h"
+#include "public/ewk_context.h"
#include "tizen_webview/public/tw_callbacks.h"
#include "devtools_delegate_efl.h"
settings_->getWebViewSettings()));
}
-void EWebView::SetContentSecurityPolicy(const char* policy, tizen_webview::ContentSecurityPolicyType type) {
+void EWebView::SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type) {
web_contents_delegate_->SetContentSecurityPolicy((policy ? policy : std::string()), type);
}
context_menu_->HideContextMenu();
}
-void EWebView::Find(const char* text, tizen_webview::Find_Options find_options) {
+void EWebView::Find(const char* text, Ewk_Find_Options find_options) {
base::string16 find_text = base::UTF8ToUTF16(text);
bool find_next = (previous_text_ == find_text);
}
blink::WebFindOptions web_find_options;
- web_find_options.forward = !(find_options & TW_FIND_OPTIONS_BACKWARDS);
- web_find_options.matchCase = !(find_options & TW_FIND_OPTIONS_CASE_INSENSITIVE);
+ web_find_options.forward = !(find_options & EWK_FIND_OPTIONS_BACKWARDS);
+ web_find_options.matchCase = !(find_options & EWK_FIND_OPTIONS_CASE_INSENSITIVE);
web_find_options.findNext = find_next;
web_contents_->Find(current_find_request_id_, find_text, web_find_options);
#include "private/ewk_back_forward_list_private.h"
#include "private/ewk_settings_private.h"
#include "private/ewk_web_application_icon_data_private.h"
+#include "public/ewk_view.h"
#include "eweb_view_callbacks.h"
#include "selection_controller_efl.h"
#include "web_contents_delegate_efl.h"
#include "tizen_webview/public/tw_hit_test.h"
#include "tizen_webview/public/tw_callbacks.h"
-#include "tizen_webview/public/tw_content_security_policy.h"
-#include "tizen_webview/public/tw_find_options.h"
namespace content {
class RenderViewHost;
void LoadData(const char* data, size_t size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri = NULL);
void InvokeLoadError(const tizen_webview::Error &error);
void InvokeAuthCallback(LoginDelegateEfl* login_delegate, const GURL& url, const std::string& realm);
- void Find(const char* text, tizen_webview::Find_Options);
+ void Find(const char* text, Ewk_Find_Options);
void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
- void SetContentSecurityPolicy(const char* policy, tizen_webview::ContentSecurityPolicyType type);
+ void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
void ShowPopupMenu(const std::vector<content::MenuItem>& items,
int selectedIndex, bool multiple);
Eina_Bool HidePopupMenu();
#include "public/ewk_view.h"
#include "public/ewk_cookie_manager.h"
#include "tizen_webview/public/tw_callbacks.h"
-#include "tizen_webview/public/tw_cookie_accept_policy.h"
#define STATIC_ENUM_IS_EQUAL(left, right) \
static_assert(static_cast<int>(left) == static_cast<int>(right), \
EWK_UNFOCUS_DIRECTION_LEFT);
STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_RIGHT,
EWK_UNFOCUS_DIRECTION_RIGHT);
-
- STATIC_ENUM_IS_EQUAL(EWK_COOKIE_ACCEPT_POLICY_ALWAYS,
- tizen_webview::TW_COOKIE_ACCEPT_POLICY_ALWAYS);
- STATIC_ENUM_IS_EQUAL(EWK_COOKIE_ACCEPT_POLICY_NEVER,
- tizen_webview::TW_COOKIE_ACCEPT_POLICY_NEVER);
- STATIC_ENUM_IS_EQUAL(EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY,
- tizen_webview::TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
}
// To access enum values without namespace
using namespace tizen_webview;
-tw::Cookie_Accept_Policy to(Ewk_Cookie_Accept_Policy val)
-{
- GLUE_CAST_START(val)
- GLUE_CAST_TO(EWK_COOKIE_ACCEPT_POLICY_ALWAYS, TW_COOKIE_ACCEPT_POLICY_ALWAYS)
- GLUE_CAST_TO(EWK_COOKIE_ACCEPT_POLICY_NEVER, TW_COOKIE_ACCEPT_POLICY_NEVER)
- GLUE_CAST_TO(EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY, TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY)
- GLUE_CAST_END()
-}
-
-Ewk_Cookie_Accept_Policy from(tw::Cookie_Accept_Policy val)
-{
- GLUE_CAST_START(val)
- GLUE_CAST_FROM(EWK_COOKIE_ACCEPT_POLICY_ALWAYS, TW_COOKIE_ACCEPT_POLICY_ALWAYS)
- GLUE_CAST_FROM(EWK_COOKIE_ACCEPT_POLICY_NEVER, TW_COOKIE_ACCEPT_POLICY_NEVER)
- GLUE_CAST_FROM(EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY, TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY)
- GLUE_CAST_END()
-}
-
-tw::Legacy_Font_Size_Mode to(Ewk_Legacy_Font_Size_Mode val)
-{
- GLUE_CAST_START(val)
- GLUE_CAST_TO(EWK_LEGACY_FONT_SIZE_MODE_ALWAYS, TW_LEGACY_FONT_SIZE_MODE_ALWAYS)
- GLUE_CAST_TO(EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH, TW_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH)
- GLUE_CAST_TO(EWK_LEGACY_FONT_SIZE_MODE_NEVER, TW_LEGACY_FONT_SIZE_MODE_NEVER)
- GLUE_CAST_END()
-}
-
-Ewk_Legacy_Font_Size_Mode from(tw::Legacy_Font_Size_Mode val)
-{
- GLUE_CAST_START(val)
- GLUE_CAST_FROM(EWK_LEGACY_FONT_SIZE_MODE_ALWAYS, TW_LEGACY_FONT_SIZE_MODE_ALWAYS)
- GLUE_CAST_FROM(EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH, TW_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH)
- GLUE_CAST_FROM(EWK_LEGACY_FONT_SIZE_MODE_NEVER, TW_LEGACY_FONT_SIZE_MODE_NEVER)
- GLUE_CAST_END()
-}
-
tw::Hit_Test_Result_Context to(Ewk_Hit_Test_Result_Context val)
{
GLUE_SET_FLAG_TO_INIT(res, val, static_cast<Ewk_Hit_Test_Result_Context>(0), static_cast<tw::Hit_Test_Result_Context>(0))
GLUE_CAST_END()
}
-tw::Touch_Event_Type to(Ewk_Touch_Event_Type val)
-{
- GLUE_CAST_START(val)
- GLUE_CAST_TO(EWK_TOUCH_START, TW_TOUCH_START)
- GLUE_CAST_TO(EWK_TOUCH_MOVE, TW_TOUCH_MOVE)
- GLUE_CAST_TO(EWK_TOUCH_END, TW_TOUCH_END)
- GLUE_CAST_TO(EWK_TOUCH_CANCEL, TW_TOUCH_CANCEL)
- GLUE_CAST_END()
-}
-
-Ewk_Touch_Event_Type from(tw::Touch_Event_Type val)
-{
- GLUE_CAST_START(val)
- GLUE_CAST_FROM(EWK_TOUCH_START, TW_TOUCH_START)
- GLUE_CAST_FROM(EWK_TOUCH_MOVE, TW_TOUCH_MOVE)
- GLUE_CAST_FROM(EWK_TOUCH_END, TW_TOUCH_END)
- GLUE_CAST_FROM(EWK_TOUCH_CANCEL, TW_TOUCH_CANCEL)
- GLUE_CAST_END()
-}
-
-tw::Find_Options to(Ewk_Find_Options val)
-{
- GLUE_SET_FLAG_TO_INIT(res, val, EWK_FIND_OPTIONS_NONE, TW_FIND_OPTIONS_NONE)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_CASE_INSENSITIVE, TW_FIND_OPTIONS_CASE_INSENSITIVE)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_BACKWARDS, TW_FIND_OPTIONS_BACKWARDS)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_AT_WORD_STARTS, TW_FIND_OPTIONS_AT_WORD_STARTS)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, TW_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_WRAP_AROUND, TW_FIND_OPTIONS_WRAP_AROUND)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_SHOW_OVERLAY, TW_FIND_OPTIONS_SHOW_OVERLAY)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR, TW_FIND_OPTIONS_SHOW_FIND_INDICATOR)
- GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT, TW_FIND_OPTIONS_SHOW_HIGHLIGHT)
- return static_cast<tw::Find_Options>(res);
-}
-
-Ewk_Find_Options from(tw::Find_Options val)
-{
- GLUE_SET_FLAG_FROM_INIT(res, val, EWK_FIND_OPTIONS_NONE, TW_FIND_OPTIONS_NONE)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_CASE_INSENSITIVE, TW_FIND_OPTIONS_CASE_INSENSITIVE)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_BACKWARDS, TW_FIND_OPTIONS_BACKWARDS)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_AT_WORD_STARTS, TW_FIND_OPTIONS_AT_WORD_STARTS)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, TW_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_WRAP_AROUND, TW_FIND_OPTIONS_WRAP_AROUND)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_SHOW_OVERLAY, TW_FIND_OPTIONS_SHOW_OVERLAY)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR, TW_FIND_OPTIONS_SHOW_FIND_INDICATOR)
- GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT, TW_FIND_OPTIONS_SHOW_HIGHLIGHT)
- return static_cast<Ewk_Find_Options>(res);
-}
-
-tw::ContentSecurityPolicyType to(Ewk_CSP_Header_Type val) {
- GLUE_CAST_START(val)
- GLUE_CAST_TO(EWK_REPORT_ONLY, TW_CSP_REPORT_ONLY)
- GLUE_CAST_TO(EWK_ENFORCE_POLICY, TW_CSP_ENFORCE_POLICY)
- GLUE_CAST_TO(EWK_DEFAULT_POLICY, TW_CSP_DEFAULT_POLICY)
- GLUE_CAST_END()
-}
-
-Ewk_CSP_Header_Type from(tw::ContentSecurityPolicyType val) {
- GLUE_CAST_START(val)
- GLUE_CAST_FROM(EWK_REPORT_ONLY, TW_CSP_REPORT_ONLY)
- GLUE_CAST_FROM(EWK_ENFORCE_POLICY, TW_CSP_ENFORCE_POLICY)
- GLUE_CAST_FROM(EWK_DEFAULT_POLICY, TW_CSP_DEFAULT_POLICY)
- GLUE_CAST_END()
-}
-
} // namespace chromium_glue
#endif
#include "ewk_context.h"
-#include "ewk_cookie_manager.h"
#include "ewk_settings.h"
#include "ewk_hit_test.h"
#include "ewk_policy_decision.h"
#include "ewk_view.h"
#include <tizen_webview/public/tw_callbacks.h>
-#include <tizen_webview/public/tw_content_security_policy.h>
-#include <tizen_webview/public/tw_cookie_accept_policy.h>
-#include <tizen_webview/public/tw_legacy_font_size_mode.h>
#include <tizen_webview/public/tw_hit_test.h>
#include <tizen_webview/public/tw_policy_decision.h>
-#include <tizen_webview/public/tw_touch_event.h>
-#include <tizen_webview/public/tw_find_options.h>
namespace chromium_glue {
namespace tw = tizen_webview;
// --- ewk<->chromium type conversion ---
-tw::Cookie_Accept_Policy to (Ewk_Cookie_Accept_Policy);
-Ewk_Cookie_Accept_Policy from(tw::Cookie_Accept_Policy);
-
-tw::Legacy_Font_Size_Mode to(Ewk_Legacy_Font_Size_Mode);
-Ewk_Legacy_Font_Size_Mode from(tw::Legacy_Font_Size_Mode);
-
-
tw::Hit_Test_Mode to(Ewk_Hit_Test_Mode);
Ewk_Hit_Test_Mode from(tw::Hit_Test_Mode);
tw::Policy_Navigation_Type to(Ewk_Policy_Navigation_Type);
Ewk_Policy_Navigation_Type from(tw::Policy_Navigation_Type);
-tw::Touch_Event_Type to(Ewk_Touch_Event_Type);
-Ewk_Touch_Event_Type from(tw::Touch_Event_Type);
-
-tw::Find_Options to(Ewk_Find_Options);
-Ewk_Find_Options from(tw::Find_Options);
-
-tw::ContentSecurityPolicyType to(Ewk_CSP_Header_Type);
-Ewk_CSP_Header_Type from(tw::ContentSecurityPolicyType);
-
} // namespace chromium_glue
#endif // CHROMIUM_GLUE_H_
net::HttpStreamFactory::set_spdy_enabled(flag);
}
-void Ewk_Settings::setCurrentLegacyFontSizeMode(tizen_webview::Legacy_Font_Size_Mode mode) {
+void Ewk_Settings::setCurrentLegacyFontSizeMode(Ewk_Legacy_Font_Size_Mode mode) {
m_currentLegacyFontSizeMode = mode;
#if !defined(EWK_BRINGUP)
m_preferences.current_legacy_font_size_mode = static_cast<content::LegacyFontSizeMode>(mode);
#include <Evas.h>
#include <content/public/common/web_preferences.h>
-
-#include "tizen_webview/public/tw_legacy_font_size_mode.h"
+#include "public/ewk_settings.h"
#include "tizen_webview/public/tw_settings.h"
class Ewk_Settings {
, m_edgeEffectEnabled(true)
, m_textZoomEnabled(true)
, m_loadRemoteImages(true)
- , m_currentLegacyFontSizeMode(tizen_webview::TW_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH)
+ , m_currentLegacyFontSizeMode(EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH)
, m_pasteImageUriEnabled(true)
, m_defaultKeypadEnabled(true)
, m_useKeyPadWithoutUserAction(true)
bool textZoomEnabled() const { return m_textZoomEnabled; }
void setLoadRemoteImages(bool loadRemoteImages) { m_loadRemoteImages = loadRemoteImages; }
bool loadRemoteImages() const { return m_loadRemoteImages; }
- void setCurrentLegacyFontSizeMode(tizen_webview::Legacy_Font_Size_Mode mode);
- tizen_webview::Legacy_Font_Size_Mode currentLegacyFontSizeMode() const { return m_currentLegacyFontSizeMode; }
+ void setCurrentLegacyFontSizeMode(Ewk_Legacy_Font_Size_Mode mode);
+ Ewk_Legacy_Font_Size_Mode currentLegacyFontSizeMode() const { return m_currentLegacyFontSizeMode; }
void setPasteImageUriEnabled(bool enable) { m_pasteImageUriEnabled = enable; }
bool pasteImageUriEnabled() const {return m_pasteImageUriEnabled;}
bool defaultKeypadEnabled() const { return m_defaultKeypadEnabled; }
bool m_edgeEffectEnabled;
bool m_textZoomEnabled;
bool m_loadRemoteImages;
- tizen_webview::Legacy_Font_Size_Mode m_currentLegacyFontSizeMode;
+ Ewk_Legacy_Font_Size_Mode m_currentLegacyFontSizeMode;
bool m_pasteImageUriEnabled;
bool m_defaultKeypadEnabled;
bool m_useKeyPadWithoutUserAction;
#include "cookie_manager.h"
#include "public/ewk_log.h"
-#include "private/chromium_glue.h"
#include "private/ewk_cookie_manager_private.h"
#define EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager, ...) \
Ewk_Cookie_Accept_Policy policy)
{
EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
- cookie_manager->SetCookiePolicy(chromium_glue::to(policy));
+ cookie_manager->SetCookiePolicy(policy);
}
void ewk_cookie_manager_accept_policy_async_get(const Ewk_Cookie_Manager* manager,
EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
EINA_SAFETY_ON_NULL_RETURN(callback);
- // WARNING (sns.park):
- // reinterpret_cast is potentially unsafe because enum values of ewk and chromium
- // may diverge in the future. In other words, the below code is valid only under
- // the assumption the enum values for Ewk_Cookie_Accept_Policy be aligned with
- // tizen_webview::Cookie_Accept_Policy.
- // TODO: replace reinterpret_cast with better solution
- // assert the above assumption in private/api_static_check.cc
- cookie_manager->GetAcceptPolicyAsync(reinterpret_cast<CookieManager::AsyncPolicyGetCb>(callback), data);
+ cookie_manager->GetAcceptPolicyAsync(callback, data);
}
void ewk_cookie_manager_async_hostnames_with_cookies_get(const Ewk_Cookie_Manager* manager,
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
- settings->setCurrentLegacyFontSizeMode(chromium_glue::to(mode));
+ settings->setCurrentLegacyFontSizeMode(mode);
ewkUpdateWebkitPreferences(settings->getEvasObject());
return true;
}
Ewk_Legacy_Font_Size_Mode ewk_settings_current_legacy_font_size_mode_get(const Ewk_Settings *settings)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH);
- return chromium_glue::from(settings->currentLegacyFontSizeMode());
+ return settings->currentLegacyFontSizeMode();
}
Eina_Bool ewk_settings_paste_image_uri_mode_set(Ewk_Settings *settings, Eina_Bool enable)
{
EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
EINA_SAFETY_ON_NULL_RETURN(policy);
- impl->SetContentSecurityPolicy(policy, chromium_glue::to(type));
+ impl->SetContentSecurityPolicy(policy, type);
}
void ewk_view_application_cache_permission_callback_set(Evas_Object* ewkView, Ewk_View_Applicacion_Cache_Permission_Callback callback, void* userData)
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(text, EINA_FALSE);
- impl->Find(text, chromium_glue::to(options));
+ impl->Find(text, options);
return EINA_TRUE;
}
COMPILE_ASSERT(
int(SecurityPolicyHeaderType::WebContentSecurityPolicyHeaderTypeReport) ==
- int(tizen_webview::TW_CSP_REPORT_ONLY), mismatching_enums);
+ int(EWK_REPORT_ONLY), mismatching_enums);
COMPILE_ASSERT(
int(SecurityPolicyHeaderType::WebContentSecurityPolicyHeaderTypeEnforce) ==
- int(tizen_webview::TW_CSP_ENFORCE_POLICY), mismatching_enums);
+ int(EWK_ENFORCE_POLICY), mismatching_enums);
-SecurityPolicyHeaderType ToSecurityPolicyHeaderType(
- tizen_webview::ContentSecurityPolicyType type) {
+SecurityPolicyHeaderType ToSecurityPolicyHeaderType(Ewk_CSP_Header_Type type) {
return static_cast<SecurityPolicyHeaderType>(type);
}
#endif
void RenderViewObserverEfl::DidCreateDocumentElement(blink::WebLocalFrame* frame)
{
std::string policy;
- tizen_webview::ContentSecurityPolicyType type = TW_CSP_DEFAULT_POLICY;
+ Ewk_CSP_Header_Type type = EWK_DEFAULT_POLICY;
Send(new EwkHostMsg_GetContentSecurityPolicy(render_view()->GetRoutingID(), &policy, &type));
#if !defined(EWK_BRINGUP)
// Since, Webkit supports some more types and we cast ewk type to Webkit type.
// We allow only ewk types.
- if (type == TW_CSP_REPORT_ONLY || type == TW_CSP_ENFORCE_POLICY) {
+ if (type == EWK_REPORT_ONLY || type == EWK_ENFORCE_POLICY) {
frame->document().setContentSecurityPolicyUsingHeader(
blink::WebString::fromUTF8(policy), ToSecurityPolicyHeaderType(type));
}
#endif
}
-void RenderViewObserverEfl::OnSetContentSecurityPolicy(const std::string& policy, tizen_webview::ContentSecurityPolicyType header_type)
+void RenderViewObserverEfl::OnSetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type)
{
blink::WebView* view = render_view()->GetWebView();
DCHECK(view);
#include "renderer/print_web_view_helper_efl.h"
#include "content/public/renderer/render_view_observer.h"
#include "private/ewk_hit_test_private.h"
+#include "public/ewk_view.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/web/WebViewModeEnums.h"
-#include "tizen_webview/public/tw_content_security_policy.h"
#include "tizen_webview/public/tw_hit_test.h"
namespace base {
void WillSubmitForm(blink::WebLocalFrame* frame, const blink::WebFormElement& form) override;
private:
- void OnSetContentSecurityPolicy(const std::string& policy, tizen_webview::ContentSecurityPolicyType header_type);
+ void OnSetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type);
void OnScale(double scale_factor, int x, int y);
void OnSetScroll(int x, int y);
void OnUseSettingsFont();
+++ /dev/null
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 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.
-
-#ifndef TIZEN_WEBVIEW_PUBLIC_TW_CONTENT_SECURITY_POLICY_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_CONTENT_SECURITY_POLICY_H_
-
-namespace tizen_webview {
-
-enum ContentSecurityPolicyType {
- TW_CSP_REPORT_ONLY,
- TW_CSP_ENFORCE_POLICY,
- TW_CSP_DEFAULT_POLICY
-};
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_CONTENT_SECURITY_POLICY_H_
+++ /dev/null
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 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.
-
-#ifndef TIZEN_WEBVIEW_PUBLIC_TW_COOKIE_ACCEPT_POLICY_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_COOKIE_ACCEPT_POLICY_H_
-
-namespace tizen_webview {
-
-enum Cookie_Accept_Policy {
- TW_COOKIE_ACCEPT_POLICY_ALWAYS, // Accepts every cookie sent from any page.
- TW_COOKIE_ACCEPT_POLICY_NEVER, // Rejects all cookies.
- TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY // Accepts only cookies set by the main document loaded.
-};
-
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_COOKIE_ACCEPT_POLICY_H_
+++ /dev/null
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 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.
-
-#ifndef TIZEN_WEBVIEW_PUBLIC_TW_FIND_OPTIONS_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_FIND_OPTIONS_H_
-
-namespace tizen_webview {
-
-// Enum values used to specify search options.
-// @brief Provides option to find text
-// @info Keep this in sync with ewk_view.h
-enum Find_Options {
- TW_FIND_OPTIONS_NONE, // no search flags, this means a case sensitive, no wrap, forward only search
- TW_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, // case insensitive search
- TW_FIND_OPTIONS_BACKWARDS = 1 << 3, // search backwards
- TW_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, // search text only at the beginning of the words
- TW_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2,
- // treat capital letters in the middle of words as word start
- TW_FIND_OPTIONS_WRAP_AROUND = 1 << 4, // if not present search will stop at the end of the document
- TW_FIND_OPTIONS_SHOW_OVERLAY = 1 << 5, // show overlay
- TW_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, // show indicator
- TW_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 // show highlight
-};
-
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_FIND_OPTIONS_H_
+++ /dev/null
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 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.
-
-#ifndef TIZEN_WEBVIEW_PUBLIC_TW_LEGACY_FONT_SIZE_MODE_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_LEGACY_FONT_SIZE_MODE_H_
-
-namespace tizen_webview {
-
-enum Legacy_Font_Size_Mode {
- TW_LEGACY_FONT_SIZE_MODE_ALWAYS,
- TW_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH,
- TW_LEGACY_FONT_SIZE_MODE_NEVER
-};
-
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_LEGACY_FONT_SIZE_MODE_H_
+++ /dev/null
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 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.
-
-#ifndef TIZEN_WEBVIEW_PUBLIC_TW_TOUCH_EVENT_H_
-#define TIZEN_WEBVIEW_PUBLIC_TW_TOUCH_EVENT_H_
-
-namespace tizen_webview {
-
-enum Touch_Event_Type {
- TW_TOUCH_START,
- TW_TOUCH_MOVE,
- TW_TOUCH_END,
- TW_TOUCH_CANCEL
-};
-
-} // namespace tizen_webview
-
-#endif // TIZEN_WEBVIEW_PUBLIC_TW_TOUCH_EVENT_H_
#include "base/memory/ref_counted.h"
#include "ewk_enums.h"
+#include "public/ewk_context.h"
#include "tizen_webview/public/tw_callbacks.h"
class CookieManager;
return impl_->ExecuteEditCommand(command, value);
}
-void WebView::Find(const char* text, Find_Options options) {
+void WebView::Find(const char* text, Ewk_Find_Options options) {
return impl_->Find(text, options);
}
return impl_->StopFinding();
}
-void WebView::SetContentSecurityPolicy(const char* policy, ContentSecurityPolicyType type) {
+void WebView::SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type) {
return impl_->SetContentSecurityPolicy(policy, type);
}
#include "base/macros.h"
#include "content/public/browser/navigation_controller.h"
#include "tizen_webview/public/tw_callbacks.h"
-#include "tizen_webview/public/tw_content_security_policy.h"
#include "tizen_webview/public/tw_hit_test.h"
-#include "tizen_webview/public/tw_find_options.h"
#include "ewk_touch.h"
+#include "public/ewk_view.h"
#include "third_party/WebKit/public/web/WebViewModeEnums.h"
// TODO: Remove this dependency
void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
void SetOverrideEncoding(const std::string& encoding);
void ExecuteEditCommand(const char* command, const char* value);
- void Find(const char* text, Find_Options options);
+ void Find(const char* text, Ewk_Find_Options options);
void StopFinding();
- void SetContentSecurityPolicy(const char* policy, ContentSecurityPolicyType type);
+ void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
void SetViewGeolocationPermissionCallback(View_Geolocation_Permission_Callback callback, void* user_data);
void SetViewUnfocusAllowCallback(View_Unfocus_Allow_Callback callback, void* user_data);
}
void WebViewEvasEventHandler::__OnTouchDown(WebView* data, Evas *e, Evas_Object *obj, void *event_info) {
- data->GetEvasEventHandler()->HandleEventDefault_TouchEvents(TW_TOUCH_START);
+ data->GetEvasEventHandler()->HandleEventDefault_TouchEvents(EWK_TOUCH_START);
}
void WebViewEvasEventHandler::__OnTouchUp(WebView* data, Evas *e, Evas_Object *obj, void *event_info) {
- data->GetEvasEventHandler()->HandleEventDefault_TouchEvents(TW_TOUCH_END);
+ data->GetEvasEventHandler()->HandleEventDefault_TouchEvents(EWK_TOUCH_END);
}
void WebViewEvasEventHandler::__OnTouchMove(WebView* data, Evas *e, Evas_Object *obj, void *event_info) {
- data->GetEvasEventHandler()->HandleEventDefault_TouchEvents(TW_TOUCH_MOVE);
+ data->GetEvasEventHandler()->HandleEventDefault_TouchEvents(EWK_TOUCH_MOVE);
}
return webview_->GetSelectionController()->TextSelectionUp(x, y);
}
-bool WebViewEvasEventHandler::HandleEventDefault_TouchEvents(Touch_Event_Type type) {
+bool WebViewEvasEventHandler::HandleEventDefault_TouchEvents(Ewk_Touch_Event_Type type) {
// These constants are used to map multi touch's touch id(s).
// The poorly-written Tizen API document says:
// "0 for Mouse Event and device id for Multi Event."
pt.x = point->x;
pt.y = point->y;
point->state = evas_touch_point_list_nth_state_get(clip_data->evas, i);
- if (type == TW_TOUCH_CANCEL)
+ if (type == EWK_TOUCH_CANCEL)
point->state = EVAS_TOUCH_POINT_CANCEL;
points = eina_list_append(points, point);
}
- if (type == TW_TOUCH_START)
+ if (type == EWK_TOUCH_START)
webview_->SetFocus(EINA_TRUE);
webview_->HandleTouchEvents(type, points,
#if defined(OS_TIZEN_MOBILE)
if (count >= 2) {
- if (type == TW_TOUCH_START) {
+ if (type == EWK_TOUCH_START) {
LOG(ERROR) << " wkext_motion_tilt_start";
wkext_motion_tilt_start(evas_object_, &pt);
- } else if(type == TW_TOUCH_END) {
+ } else if(type == EWK_TOUCH_END) {
wkext_motion_tilt_stop();
}
}
#define TIZEN_WEBVIEW_EVENT_TW_WEBVIEW_EVAS_EVENT_HANDLER_H_
#include <Evas.h>
-#include "tizen_webview/public/tw_touch_event.h"
namespace tizen_webview {
bool HandleEventDefault_MouseWheel(const Evas_Event_Mouse_Wheel*);
bool HandleEventDefault_TextSelectionDown(int x, int y);
bool HandleEventDefault_TextSelectionUp (int x, int y);
- bool HandleEventDefault_TouchEvents(tizen_webview::Touch_Event_Type type);
+ bool HandleEventDefault_TouchEvents(Ewk_Touch_Event_Type type);
private:
WebView* webview_;
}
}
-void WebContentsDelegateEfl::SetContentSecurityPolicy(const std::string& policy, tizen_webview::ContentSecurityPolicyType header_type) {
+void WebContentsDelegateEfl::SetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type) {
if (document_created_) {
RenderViewHost* rvh = web_contents_.GetRenderViewHost();
rvh->Send(new EwkViewMsg_SetCSP(rvh->GetRoutingID(), policy, header_type));
void WebContentsDelegateEfl::OnGetContentSecurityPolicy(IPC::Message* reply_msg) {
document_created_ = true;
if (!pending_content_security_policy_.get()) {
- EwkHostMsg_GetContentSecurityPolicy::WriteReplyParams(reply_msg, std::string(), TW_CSP_DEFAULT_POLICY);
+ EwkHostMsg_GetContentSecurityPolicy::WriteReplyParams(reply_msg, std::string(), EWK_DEFAULT_POLICY);
} else {
EwkHostMsg_GetContentSecurityPolicy::WriteReplyParams(reply_msg,
pending_content_security_policy_->policy, pending_content_security_policy_->header_type);
#include "content/browser/web_contents/web_contents_impl.h"
#include "url/gurl.h"
#include "browser/favicon/favicon_downloader.h"
+#include "public/ewk_view.h"
#include "third_party/WebKit/Source/platform/text/TextDirection.h"
#include "ui/base/ime/text_input_type.h"
-#include "tizen_webview/public/tw_content_security_policy.h"
-
class DidPrintPagesParams;
class Ewk_Wrt_Message_Data;
class JavaScriptDialogManagerEfl;
void OnFormSubmit(const GURL&);
void OnUpdateSettings(const Ewk_Settings *settings);
- void SetContentSecurityPolicy(const std::string& policy, tizen_webview::ContentSecurityPolicyType header_type);
+ void SetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type);
void UpdateFormNavigation(int formElementCount, int currentNodeIndex,
bool prevState, bool nextState);
WebContents& web_contents_;
struct ContentSecurityPolicy {
- ContentSecurityPolicy(const std::string& p, tizen_webview::ContentSecurityPolicyType type)
+ ContentSecurityPolicy(const std::string& p, Ewk_CSP_Header_Type type)
: policy(p),
header_type(type) {
}
std::string policy;
- tizen_webview::ContentSecurityPolicyType header_type;
+ Ewk_CSP_Header_Type header_type;
};
#if defined(TIZEN_MULTIMEDIA_SUPPORT)