From f6412b0b39b31e2f3b5910e4a6b16e04e65bebd1 Mon Sep 17 00:00:00 2001 From: Arnaud Renevier Date: Tue, 14 Apr 2015 11:03:19 -0700 Subject: [PATCH] Remove tw_callbacks.h We can also remove chromium_glue and api_static_check now. Change-Id: Id9d23111224cfcba34ada147f701b4bf51afa603 Signed-off-by: Arnaud Renevier --- .../browser/javascript_dialog_manager_efl.cc | 12 +- .../browser/javascript_dialog_manager_efl.h | 18 +-- .../browser/vibration/vibration_provider_client.cc | 4 +- .../browser/vibration/vibration_provider_client.h | 14 +-- tizen_src/ewk/efl_integration/efl_integration.gypi | 4 - tizen_src/ewk/efl_integration/eweb_context.cc | 30 ++--- tizen_src/ewk/efl_integration/eweb_context.h | 23 ++-- tizen_src/ewk/efl_integration/eweb_view.cc | 62 +++++----- tizen_src/ewk/efl_integration/eweb_view.h | 72 ++++++----- .../efl_integration/private/api_static_check.cc | 28 ----- .../ewk/efl_integration/private/chromium_glue.cc | 64 ---------- .../ewk/efl_integration/private/chromium_glue.h | 30 ----- .../ewk/efl_integration/public/ewk_context.cc | 1 - .../ewk/efl_integration/public/ewk_hit_test.cc | 1 - .../efl_integration/public/ewk_policy_decision.cc | 1 - .../ewk/efl_integration/public/ewk_settings.cc | 1 - tizen_src/ewk/efl_integration/public/ewk_view.cc | 12 +- .../tizen_webview/public/tw_callbacks.h | 134 --------------------- .../tizen_webview/public/tw_web_context.cc | 14 +-- .../tizen_webview/public/tw_web_context.h | 15 ++- .../tizen_webview/public/tw_webview.cc | 32 ++--- .../tizen_webview/public/tw_webview.h | 33 +++-- 22 files changed, 166 insertions(+), 439 deletions(-) delete mode 100644 tizen_src/ewk/efl_integration/private/api_static_check.cc delete mode 100644 tizen_src/ewk/efl_integration/private/chromium_glue.cc delete mode 100644 tizen_src/ewk/efl_integration/private/chromium_glue.h delete mode 100644 tizen_src/ewk/efl_integration/tizen_webview/public/tw_callbacks.h diff --git a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc index 097593d..8ab4ad7 100644 --- a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc @@ -40,7 +40,7 @@ bool JavaScriptModalCallbacksData::Run(Evas_Object* obj, const char* message_tex } JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithAlertDialogData( - tizen_webview::View_JavaScript_Alert_Callback callback, + Ewk_View_JavaScript_Alert_Callback callback, void* user_data) { JavaScriptModalCallbacksData* callback_data = new JavaScriptModalCallbacksData( @@ -50,7 +50,7 @@ JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithAlertDialo } JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithConfirmDialogData( - tizen_webview::View_JavaScript_Confirm_Callback callback, + Ewk_View_JavaScript_Confirm_Callback callback, void* user_data) { JavaScriptModalCallbacksData* callback_data = new JavaScriptModalCallbacksData( @@ -60,7 +60,7 @@ JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithConfirmDia } JavaScriptModalCallbacksData* JavaScriptModalCallbacksData::CreateWithPromptDialogData( - tizen_webview::View_JavaScript_Prompt_Callback callback, + Ewk_View_JavaScript_Prompt_Callback callback, void* user_data) { JavaScriptModalCallbacksData* callback_data = new JavaScriptModalCallbacksData( @@ -127,17 +127,17 @@ void JavaScriptDialogManagerEfl::RunJavaScriptDialog(content::WebContents* web_c callback)); } -void JavaScriptDialogManagerEfl::SetAlertCallback(tizen_webview::View_JavaScript_Alert_Callback callback, void* user_data) +void JavaScriptDialogManagerEfl::SetAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data) { alert_callback_data_.reset(JavaScriptModalCallbacksData::CreateWithAlertDialogData(callback, user_data)); } -void JavaScriptDialogManagerEfl::SetConfirmCallback(tizen_webview::View_JavaScript_Confirm_Callback callback, void* user_data) +void JavaScriptDialogManagerEfl::SetConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data) { confirm_callback_data_.reset(JavaScriptModalCallbacksData::CreateWithConfirmDialogData(callback, user_data)); } -void JavaScriptDialogManagerEfl::SetPromptCallback(tizen_webview::View_JavaScript_Prompt_Callback callback, void* user_data) +void JavaScriptDialogManagerEfl::SetPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data) { prompt_callback_data_.reset(JavaScriptModalCallbacksData::CreateWithPromptDialogData(callback, user_data)); } diff --git a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h index 7665a1a..ef9990f 100644 --- a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h +++ b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h @@ -20,20 +20,20 @@ class JavaScriptModalDialogEfl; class JavaScriptModalCallbacksData { public: bool Run(Evas_Object* obj, const char* content_text, const char* default_text); - static JavaScriptModalCallbacksData* CreateWithAlertDialogData(tizen_webview::View_JavaScript_Alert_Callback callback, + static JavaScriptModalCallbacksData* CreateWithAlertDialogData(Ewk_View_JavaScript_Alert_Callback callback, void* user_data); - static JavaScriptModalCallbacksData* CreateWithConfirmDialogData(tizen_webview::View_JavaScript_Confirm_Callback callback, + static JavaScriptModalCallbacksData* CreateWithConfirmDialogData(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data); - static JavaScriptModalCallbacksData* CreateWithPromptDialogData(tizen_webview::View_JavaScript_Prompt_Callback callback, + static JavaScriptModalCallbacksData* CreateWithPromptDialogData(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data); ~JavaScriptModalCallbacksData() { } private: JavaScriptModalCallbacksData(content::JavaScriptMessageType javascript_message_type, void* user_data); union { - tizen_webview::View_JavaScript_Alert_Callback alert_callback_; - tizen_webview::View_JavaScript_Confirm_Callback confirm_callback_; - tizen_webview::View_JavaScript_Prompt_Callback prompt_callback_; + Ewk_View_JavaScript_Alert_Callback alert_callback_; + Ewk_View_JavaScript_Confirm_Callback confirm_callback_; + Ewk_View_JavaScript_Prompt_Callback prompt_callback_; }; void* user_data_; content::JavaScriptMessageType javascript_message_type_; @@ -77,9 +77,9 @@ class JavaScriptDialogManagerEfl: public content::JavaScriptDialogManager { NOTIMPLEMENTED(); } - void SetAlertCallback(tizen_webview::View_JavaScript_Alert_Callback callback, void* user_data); - void SetConfirmCallback(tizen_webview::View_JavaScript_Confirm_Callback callback, void* user_data); - void SetPromptCallback(tizen_webview::View_JavaScript_Prompt_Callback callback, void* user_data); + void SetAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data); + void SetConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data); + void SetPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data); void ExecuteDialogClosedCallBack(bool result, const std::string prompt_data); void SetPopupSize(int width, int height); diff --git a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.cc b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.cc index f70702f..5e224f8 100644 --- a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.cc +++ b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.cc @@ -28,8 +28,8 @@ void VibrationProviderClient::CancelVibration() { vibration_client_->cancel_vibration_(vibration_client_->user_data_); } -void VibrationProviderClient::SetVibrationClientCallbacks(tizen_webview::Vibration_Client_Vibrate_Cb vibrate, - tizen_webview::Vibration_Client_Vibration_Cancel_Cb cancelVibration, +void VibrationProviderClient::SetVibrationClientCallbacks(Ewk_Vibration_Client_Vibrate_Cb vibrate, + Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration, void* data) { vibration_client_.reset(new Ewk_Vibration_Client(vibrate, cancelVibration, data)); } diff --git a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h index b6154f5..a87169e 100644 --- a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h +++ b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h @@ -6,7 +6,7 @@ #define Vibration_Provider_Client_h #include "base/memory/scoped_ptr.h" -#include "tizen_webview/public/tw_callbacks.h" +#include "public/ewk_context.h" /** * \struct Ewk_Vibration_Client @@ -14,15 +14,15 @@ */ struct Ewk_Vibration_Client { public: - Ewk_Vibration_Client(tizen_webview::Vibration_Client_Vibrate_Cb vibrate, - tizen_webview::Vibration_Client_Vibration_Cancel_Cb cancelVibration, + Ewk_Vibration_Client(Ewk_Vibration_Client_Vibrate_Cb vibrate, + Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration, void* user_data) : vibrate_(vibrate), cancel_vibration_(cancelVibration), user_data_(user_data) {} - tizen_webview::Vibration_Client_Vibrate_Cb vibrate_; - tizen_webview::Vibration_Client_Vibration_Cancel_Cb cancel_vibration_; + Ewk_Vibration_Client_Vibrate_Cb vibrate_; + Ewk_Vibration_Client_Vibration_Cancel_Cb cancel_vibration_; void* user_data_; }; @@ -32,8 +32,8 @@ class VibrationProviderClient { static void DeleteInstance(); void Vibrate(uint64_t vibrationTime); void CancelVibration(); - void SetVibrationClientCallbacks(tizen_webview::Vibration_Client_Vibrate_Cb, - tizen_webview::Vibration_Client_Vibration_Cancel_Cb, + void SetVibrationClientCallbacks(Ewk_Vibration_Client_Vibrate_Cb, + Ewk_Vibration_Client_Vibration_Cancel_Cb, void*); private: diff --git a/tizen_src/ewk/efl_integration/efl_integration.gypi b/tizen_src/ewk/efl_integration/efl_integration.gypi index 2ebf889..35140bf 100644 --- a/tizen_src/ewk/efl_integration/efl_integration.gypi +++ b/tizen_src/ewk/efl_integration/efl_integration.gypi @@ -298,10 +298,7 @@ 'common/web_contents_utils.cc', 'common/web_contents_utils.h', - 'private/api_static_check.cc', 'private/back_forward_list.h', - 'private/chromium_glue.cc', - 'private/chromium_glue.h', 'private/ewk_auth_challenge_private.h', 'private/ewk_autofill_profile_private.cc', 'private/ewk_autofill_profile_private.h', @@ -444,7 +441,6 @@ 'tizen_webview/public/tw_context_menu_controller.cc', 'tizen_webview/public/tw_touch_point.h', 'tizen_webview/public/tw_webview_delegate.cc', - '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_selection_controller.h', diff --git a/tizen_src/ewk/efl_integration/eweb_context.cc b/tizen_src/ewk/efl_integration/eweb_context.cc index 9fd54ee..acff5a1 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.cc +++ b/tizen_src/ewk/efl_integration/eweb_context.cc @@ -56,7 +56,7 @@ namespace { */ class WebStorageGetAllOriginsDispatcher: public base::RefCountedThreadSafe { public: - WebStorageGetAllOriginsDispatcher(tizen_webview::Web_Storage_Origins_Get_Callback callback, void* user_data) + WebStorageGetAllOriginsDispatcher(Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data) : callback_(callback) , user_data_(user_data) { DCHECK(callback_); @@ -79,7 +79,7 @@ public: } private: - tizen_webview::Web_Storage_Origins_Get_Callback callback_; + Ewk_Web_Storage_Origins_Get_Callback callback_; void* user_data_; }; @@ -93,7 +93,7 @@ void SetProxyConfigCallbackOnIOThread(base::WaitableEvent* done, done->Signal(); } -void OnOriginsWithApplicationCacheObtained(tizen_webview::Web_Application_Cache_Origins_Get_Callback callback, +void OnOriginsWithApplicationCacheObtained(Ewk_Web_Application_Cache_Origins_Get_Callback callback, void* user_data, scoped_refptr collection, int result) { @@ -108,7 +108,7 @@ void OnOriginsWithApplicationCacheObtained(tizen_webview::Web_Application_Cache_ } void OnTemporaryUsageAndQuotaObtained( - tizen_webview::Web_Application_Cache_Usage_For_Origin_Get_Callback callback, + Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data, storage::QuotaStatusCode status_code, int64 usage, @@ -124,7 +124,7 @@ void OnTemporaryUsageAndQuotaObtained( } void OnGetWebDBOrigins( - tizen_webview::Web_Database_Origins_Get_Callback callback, + Ewk_Web_Database_Origins_Get_Callback callback, void* user_data, const std::set& origins_ref) { Eina_List* origins = 0; @@ -139,7 +139,7 @@ void OnGetWebDBOrigins( base::Bind(callback, origins, user_data)); } -void GetWebDBOriginsOnDBThread(tizen_webview::Web_Database_Origins_Get_Callback callback, +void GetWebDBOriginsOnDBThread(Ewk_Web_Database_Origins_Get_Callback callback, void* user_data, content::StoragePartition* partition) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); @@ -149,7 +149,7 @@ void GetWebDBOriginsOnDBThread(tizen_webview::Web_Database_Origins_Get_Callback } void OnGetFileSystemOrigins( - tizen_webview::Local_File_System_Origins_Get_Callback callback, + Ewk_Local_File_System_Origins_Get_Callback callback, void* user_data, const std::set& origins_ref) { Eina_List* origins = 0; @@ -164,7 +164,7 @@ void OnGetFileSystemOrigins( base::Bind(callback, origins, user_data)); } -void GetFileSystemOriginsOnFILEThread(tizen_webview::Web_Database_Origins_Get_Callback callback, +void GetFileSystemOriginsOnFILEThread(Ewk_Web_Database_Origins_Get_Callback callback, void* user_data, content::StoragePartition* partition) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); @@ -200,7 +200,7 @@ void EWebContext::SendWrtMessage(const Ewk_Wrt_Message_Data& data) { } void EWebContext::SetMimeOverrideCallback( - tizen_webview::Mime_Override_Callback callback, void* user_data) { + Ewk_Context_Override_Mime_For_Url_Callback callback, void* user_data) { mime_override_callback_.reset(new EwkMimeOverrideCallback(callback, user_data)); } @@ -315,7 +315,7 @@ void EWebContext::SetProxyUri(const char* uri) { done.Wait(); } -void EWebContext::SetDidStartDownloadCallback(tizen_webview::Context_Did_Start_Download_Callback callback, +void EWebContext::SetDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback callback, void* user_data) { DCHECK(start_download_callback_.get() == NULL); start_download_callback_.reset(new EwkDidStartDownloadCallback(callback,user_data)); @@ -352,7 +352,7 @@ void EWebContext::DeleteApplicationCacheForSite(const GURL& site) { partition->GetURLRequestContext(), base::Bind(&base::DoNothing)); } -void EWebContext::GetAllOriginsWithApplicationCache(tizen_webview::Web_Application_Cache_Origins_Get_Callback callback, +void EWebContext::GetAllOriginsWithApplicationCache(Ewk_Web_Application_Cache_Origins_Get_Callback callback, void* user_data) { content::StoragePartition* partition = BrowserContext::GetStoragePartition(browser_context_.get(), NULL); @@ -367,7 +367,7 @@ void EWebContext::GetAllOriginsWithApplicationCache(tizen_webview::Web_Applicati void EWebContext::GetApplicationCacheUsage( const GURL& url, - tizen_webview::Web_Application_Cache_Usage_For_Origin_Get_Callback callback, + Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data) { content::StoragePartition* partition = BrowserContext::GetStoragePartition(browser_context_.get(), NULL); @@ -408,7 +408,7 @@ void EWebContext::WebStorageDeleteForOrigin(const GURL& origin) { partition->GetDOMStorageContext()->DeleteLocalStorage(origin); } -void EWebContext::WebStorageOriginsAllGet(tizen_webview::Web_Storage_Origins_Get_Callback callback, +void EWebContext::WebStorageOriginsAllGet(Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data) { content::StoragePartition* partition = BrowserContext::GetStoragePartition(browser_context_.get(), NULL); @@ -442,7 +442,7 @@ void EWebContext::WebDBDelete(const GURL& host) { remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_WEBSQL, host); } -void EWebContext::GetAllOriginsWithWebDB(tizen_webview::Web_Database_Origins_Get_Callback callback, void* user_data) { +void EWebContext::GetAllOriginsWithWebDB(Ewk_Web_Database_Origins_Get_Callback callback, void* user_data) { content::StoragePartition* partition = BrowserContext::GetStoragePartition(browser_context_.get(), NULL); BrowserThread::PostTask( BrowserThread::DB, @@ -463,7 +463,7 @@ void EWebContext::FileSystemDelete(const GURL& host) { remover->RemoveImpl(BrowsingDataRemoverEfl::REMOVE_FILE_SYSTEMS, host); } -void EWebContext::GetAllOriginsWithFileSystem(tizen_webview::Local_File_System_Origins_Get_Callback callback, void* user_data) const { +void EWebContext::GetAllOriginsWithFileSystem(Ewk_Local_File_System_Origins_Get_Callback callback, void* user_data) const { content::StoragePartition* partition = BrowserContext::GetStoragePartition(browser_context_.get(), NULL); BrowserThread::PostTask( BrowserThread::FILE, diff --git a/tizen_src/ewk/efl_integration/eweb_context.h b/tizen_src/ewk/efl_integration/eweb_context.h index 0bf7e42..6614221 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.h +++ b/tizen_src/ewk/efl_integration/eweb_context.h @@ -9,7 +9,6 @@ #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" namespace tizen_webview { @@ -28,19 +27,19 @@ class BrowserContextEfl; class EwkDidStartDownloadCallback { public: - EwkDidStartDownloadCallback(tizen_webview::Context_Did_Start_Download_Callback callback, + EwkDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback callback, void* user_data) : callback_(callback), user_data_(user_data) { } void TriggerCallback(const std::string& url); private: - tizen_webview::Context_Did_Start_Download_Callback callback_; + Ewk_Context_Did_Start_Download_Callback callback_; void* user_data_; }; class EwkMimeOverrideCallback { public: - EwkMimeOverrideCallback(tizen_webview::Mime_Override_Callback callback, + EwkMimeOverrideCallback(Ewk_Context_Override_Mime_For_Url_Callback callback, void* user_data) : callback_(callback), user_data_(user_data) { } @@ -48,7 +47,7 @@ class EwkMimeOverrideCallback { const std::string& mime_type, char** new_mime_type) const; private: - tizen_webview::Mime_Override_Callback callback_; + Ewk_Context_Override_Mime_For_Url_Callback callback_; void* user_data_; }; @@ -74,32 +73,32 @@ class EWebContext { const char* GetProxyUri() const { return proxy_uri_.c_str(); } //download start callback handlers - void SetDidStartDownloadCallback(tizen_webview::Context_Did_Start_Download_Callback callback, + void SetDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback callback, void* user_data); EwkDidStartDownloadCallback* DidStartDownloadCallback(); void DeleteAllApplicationCache(); void DeleteApplicationCacheForSite(const GURL&); - void GetAllOriginsWithApplicationCache(tizen_webview::Web_Application_Cache_Origins_Get_Callback callback, + void GetAllOriginsWithApplicationCache(Ewk_Web_Application_Cache_Origins_Get_Callback callback, void* user_data); void GetApplicationCacheUsage( const GURL& url, - tizen_webview::Web_Application_Cache_Usage_For_Origin_Get_Callback callback, + Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data); - void GetAllOriginsWithWebDB(tizen_webview::Web_Database_Origins_Get_Callback callback, void* user_data); + void GetAllOriginsWithWebDB(Ewk_Web_Database_Origins_Get_Callback callback, void* user_data); void WebDBDelete(const GURL& host); void IndexedDBDelete(); void WebStorageDelete(); void WebStorageDeleteForOrigin(const GURL& origin); - void WebStorageOriginsAllGet(tizen_webview::Web_Storage_Origins_Get_Callback callback, void* user_data); + void WebStorageOriginsAllGet(Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data); void FileSystemDelete(const GURL& host); - void GetAllOriginsWithFileSystem(tizen_webview::Local_File_System_Origins_Get_Callback callback, void* user_data) const; + void GetAllOriginsWithFileSystem(Ewk_Local_File_System_Origins_Get_Callback callback, void* user_data) const; bool SetFaviconDatabasePath(const char *path); Evas_Object *AddFaviconObject(const char *uri, Evas *canvas) const; void SendWidgetInfo(int widget_id, double scale, const std::string &theme, const std::string &encoded_bundle); void SendWrtMessage(const Ewk_Wrt_Message_Data& message); - void SetMimeOverrideCallback(tizen_webview::Mime_Override_Callback callback, + void SetMimeOverrideCallback(Ewk_Context_Override_Mime_For_Url_Callback callback, void* user_data); bool OverrideMimeForURL(const std::string& url_spec, const std::string& mime_type, std::string& new_mime_type) const; diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index aecf81a..1699950 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -158,7 +158,7 @@ class WebViewAsyncRequestHitTestDataUserCallback: public WebViewAsyncRequestHitT WebViewAsyncRequestHitTestDataUserCallback(int x, int y, Ewk_Hit_Test_Mode mode, - tizen_webview::View_Hit_Test_Request_Callback callback, + Ewk_View_Hit_Test_Request_Callback callback, void* user_data) : WebViewAsyncRequestHitTestDataCallback(x, y, mode) , callback_(callback) @@ -171,7 +171,7 @@ class WebViewAsyncRequestHitTestDataUserCallback: public WebViewAsyncRequestHitT } private: - tizen_webview::View_Hit_Test_Request_Callback callback_; + Ewk_View_Hit_Test_Request_Callback callback_; void* user_data_; }; @@ -202,7 +202,7 @@ class AsyncHitTestRequest { public: AsyncHitTestRequest(int x, int y, Ewk_Hit_Test_Mode mode, - tizen_webview::View_Hit_Test_Request_Callback callback, void* user_data) + Ewk_View_Hit_Test_Request_Callback callback, void* user_data) : x_(x) , y_(y) , mode_(mode) @@ -219,17 +219,17 @@ class AsyncHitTestRequest int x_; int y_; Ewk_Hit_Test_Mode mode_; - tizen_webview::View_Hit_Test_Request_Callback callback_; + Ewk_View_Hit_Test_Request_Callback callback_; void* user_data_; }; class WebViewGeolocationPermissionCallback { public: - WebViewGeolocationPermissionCallback(tizen_webview::View_Geolocation_Permission_Callback cb, void* data) + WebViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback cb, void* data) : callback(cb) , user_data(data) { } - Eina_Bool Run(Evas_Object* webview, void* request, Eina_Bool* callback_result) { + Eina_Bool Run(Evas_Object* webview, _Ewk_Geolocation_Permission_Request* request, Eina_Bool* callback_result) { CHECK(callback_result); if (callback) { Eina_Bool result = callback(webview, request, user_data); @@ -240,17 +240,17 @@ class WebViewGeolocationPermissionCallback { } private: - tizen_webview::View_Geolocation_Permission_Callback callback; + Ewk_View_Geolocation_Permission_Callback callback; void* user_data; }; class WebViewUnfocusAllowCallback { public: - WebViewUnfocusAllowCallback(tizen_webview::View_Unfocus_Allow_Callback cb, void* data) + WebViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback cb, void* data) : callback(cb) , user_data(data) { } - Eina_Bool Run(Evas_Object* webview, Unfocus_Direction direction, Eina_Bool* callback_result) { + Eina_Bool Run(Evas_Object* webview, Ewk_Unfocus_Direction direction, Eina_Bool* callback_result) { CHECK(callback_result); if (callback) { Eina_Bool result = callback(webview, direction, user_data); @@ -261,7 +261,7 @@ class WebViewUnfocusAllowCallback { } private: - tizen_webview::View_Unfocus_Allow_Callback callback; + Ewk_View_Unfocus_Allow_Callback callback; void* user_data; }; @@ -625,7 +625,7 @@ int EWebView::GetOrientation() { return screen_orientation_; } -void EWebView::SetOrientationLockCallback(tizen_webview::Orientation_Lock_Cb func, void* data) { +void EWebView::SetOrientationLockCallback(Ewk_Orientation_Lock_Cb func, void* data) { orientation_lock_callback_.reset(new OrientationLockCallback(func, data)); } @@ -860,12 +860,12 @@ namespace { class JavaScriptCallbackDetails { public: - JavaScriptCallbackDetails(tizen_webview::View_Script_Execute_Callback callback_func, void *user_data, Evas_Object* view) + JavaScriptCallbackDetails(Ewk_View_Script_Execute_Callback callback_func, void *user_data, Evas_Object* view) : callback_func_(callback_func) , user_data_(user_data) , view_(view) {} - tizen_webview::View_Script_Execute_Callback callback_func_; + Ewk_View_Script_Execute_Callback callback_func_; void *user_data_; Evas_Object* view_; }; @@ -881,7 +881,7 @@ void JavaScriptComplete(JavaScriptCallbackDetails* script_callback_data, const b } //namespace -bool EWebView::ExecuteJavaScript(const char* script, tizen_webview::View_Script_Execute_Callback callback, void* userdata) { +bool EWebView::ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata) { if (!script) return false; @@ -1473,7 +1473,7 @@ _Ewk_Hit_Test* EWebView::RequestHitTestDataAt(int x, int y, Eina_Bool EWebView::AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, - tizen_webview::View_Hit_Test_Request_Callback callback, + Ewk_View_Hit_Test_Request_Callback callback, void* user_data) { int view_x, view_y; EvasToBlinkCords(x, y, &view_x, &view_y); @@ -1486,7 +1486,7 @@ Eina_Bool EWebView::AsyncRequestHitTestDataAt(int x, int y, Eina_Bool EWebView::AsyncRequestHitTestDataAtBlinkCords(int x, int y, Ewk_Hit_Test_Mode mode, - tizen_webview::View_Hit_Test_Request_Callback callback, + Ewk_View_Hit_Test_Request_Callback callback, void* user_data) { return AsyncRequestHitTestDataAtBlinkCords( x, @@ -1616,7 +1616,7 @@ void EWebView::OnSnapshot(const std::vector& pixData, int width, bool EWebView::GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, - tizen_webview::Web_App_Screenshot_Captured_Callback callback, + Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data) { #if defined(OS_TIZEN) && defined(EWK_REFACTOR) if (!rwhv()) @@ -1734,7 +1734,7 @@ _Ewk_History* EWebView::GetBackForwardHistory() const { return new _Ewk_History(web_contents_->GetController()); } -bool EWebView::WebAppCapableGet(tizen_webview::Web_App_Capable_Get_Callback callback, void *userData) { +bool EWebView::WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData) { RenderViewHost *renderViewHost = web_contents_->GetRenderViewHost(); if (!renderViewHost) { return false; @@ -1744,7 +1744,7 @@ bool EWebView::WebAppCapableGet(tizen_webview::Web_App_Capable_Get_Callback call return renderViewHost->Send(new EwkViewMsg_WebAppCapableGet(renderViewHost->GetRoutingID(), callbackId)); } -bool EWebView::WebAppIconUrlGet(tizen_webview::Web_App_Icon_URL_Get_Callback callback, void *userData) { +bool EWebView::WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData) { RenderViewHost* renderViewHost = web_contents_->GetRenderViewHost(); if (!renderViewHost) { return false; @@ -1754,7 +1754,7 @@ bool EWebView::WebAppIconUrlGet(tizen_webview::Web_App_Icon_URL_Get_Callback cal return renderViewHost->Send(new EwkViewMsg_WebAppIconUrlGet(renderViewHost->GetRoutingID(), callbackId)); } -bool EWebView::WebAppIconUrlsGet(tizen_webview::Web_App_Icon_URLs_Get_Callback callback, void *userData) { +bool EWebView::WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData) { RenderViewHost* renderViewHost = web_contents_->GetRenderViewHost(); if (!renderViewHost) { return false; @@ -1787,7 +1787,7 @@ void EWebView::InvokeWebAppIconUrlsGetCallback(const StringMap &iconUrls, int ca } void EWebView::SetNotificationPermissionCallback( - View_Notification_Permission_Callback callback, void *user_data) { + Ewk_View_Notification_Permission_Callback callback, void *user_data) { if (!callback) { notification_permission_callback_.reset(nullptr); return; @@ -1814,12 +1814,12 @@ void EwkViewPlainTextGetCallback::TriggerCallback(Evas_Object* obj, const std::s (callback_)(obj, content_text.c_str(), user_data_); } -int EWebView::SetEwkViewPlainTextGetCallback(tizen_webview::View_Plain_Text_Get_Callback callback, void* user_data) { +int EWebView::SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) { EwkViewPlainTextGetCallback* view_plain_text_callback_ptr = new EwkViewPlainTextGetCallback(callback, user_data); return plain_text_get_callback_map_.Add(view_plain_text_callback_ptr); } -bool EWebView::PlainTextGet(tizen_webview::View_Plain_Text_Get_Callback callback, void* user_data) { +bool EWebView::PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) { RenderViewHost* render_view_host = web_contents_->GetRenderViewHost(); if (!render_view_host) return false; @@ -1833,21 +1833,21 @@ void EWebView::InvokePlainTextGetCallback(const std::string& content_text, int p plain_text_get_callback_map_.Remove(plain_text_get_callback_id); } -void EWebView::SetViewGeolocationPermissionCallback(tizen_webview::View_Geolocation_Permission_Callback callback, void* user_data) { +void EWebView::SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data) { geolocation_permission_cb_.reset(new WebViewGeolocationPermissionCallback(callback, user_data)); } -bool EWebView::InvokeViewGeolocationPermissionCallback(void* permission_context, Eina_Bool* callback_result) { +bool EWebView::InvokeViewGeolocationPermissionCallback(_Ewk_Geolocation_Permission_Request* permission_context, Eina_Bool* callback_result) { return geolocation_permission_cb_->Run(evas_object_, permission_context, callback_result); } void EWebView::SetViewUnfocusAllowCallback( - tizen_webview::View_Unfocus_Allow_Callback callback, void* user_data) { + Ewk_View_Unfocus_Allow_Callback callback, void* user_data) { unfocus_allow_cb_.reset(new WebViewUnfocusAllowCallback(callback, user_data)); } bool EWebView::InvokeViewUnfocusAllowCallback( - tizen_webview::Unfocus_Direction direction, Eina_Bool* callback_result) { + Ewk_Unfocus_Direction direction, Eina_Bool* callback_result) { return unfocus_allow_cb_->Run(evas_object_, direction, callback_result); } @@ -1877,7 +1877,7 @@ bool EWebView::SaveAsPdf(int width, int height, const std::string& filename) { width, height, base::FilePath(filename))); } -bool EWebView::GetMHTMLData(tizen_webview::View_MHTML_Data_Get_Callback callback, void* user_data) { +bool EWebView::GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data) { RenderViewHost* render_view_host = web_contents_->GetRenderViewHost(); if (!render_view_host) return false; @@ -1926,7 +1926,7 @@ inline JavaScriptDialogManagerEfl* EWebView::GetJavaScriptDialogManagerEfl() { web_contents_delegate_->GetJavaScriptDialogManager(web_contents_.get())); } -void EWebView::SetJavaScriptAlertCallback(tizen_webview::View_JavaScript_Alert_Callback callback, void* user_data) { +void EWebView::SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data) { GetJavaScriptDialogManagerEfl()->SetAlertCallback(callback, user_data); } @@ -1935,7 +1935,7 @@ void EWebView::JavaScriptAlertReply() { SmartCallback().call(0); } -void EWebView::SetJavaScriptConfirmCallback(tizen_webview::View_JavaScript_Confirm_Callback callback, void* user_data) { +void EWebView::SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data) { GetJavaScriptDialogManagerEfl()->SetConfirmCallback(callback, user_data); } @@ -1944,7 +1944,7 @@ void EWebView::JavaScriptConfirmReply(bool result) { SmartCallback().call(0); } -void EWebView::SetJavaScriptPromptCallback(tizen_webview::View_JavaScript_Prompt_Callback callback, void* user_data) { +void EWebView::SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data) { GetJavaScriptDialogManagerEfl()->SetPromptCallback(callback, user_data); } diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 4cba7b0..7e36c5b 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -55,8 +55,6 @@ #include "browser/selectpicker/popup_picker.h" #endif -#include "tizen_webview/public/tw_callbacks.h" - namespace content { class RenderViewHost; class RenderWidgetHostViewEfl; @@ -86,7 +84,7 @@ class _Ewk_Hit_Test; class WebAppScreenshotCapturedCallback : public base::RefCounted { public: - WebAppScreenshotCapturedCallback(tizen_webview::Web_App_Screenshot_Captured_Callback func, void *user_data, Evas* canvas) + WebAppScreenshotCapturedCallback(Ewk_Web_App_Screenshot_Captured_Callback func, void *user_data, Evas* canvas) : func_(func), user_data_(user_data), canvas_(canvas) {} void Run(Evas_Object* image) { if (func_ != NULL) @@ -94,51 +92,51 @@ class WebAppScreenshotCapturedCallback : public base::RefCounted &urls) { @@ -169,13 +167,13 @@ class WebApplicationIconUrlsGetCallback { } private: - tizen_webview::Web_App_Icon_URLs_Get_Callback func_; + Ewk_Web_App_Icon_URLs_Get_Callback func_; void *user_data_; }; class WebApplicationCapableGetCallback { public: - WebApplicationCapableGetCallback(tizen_webview::Web_App_Capable_Get_Callback func, void *user_data) + WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func, void *user_data) : func_(func), user_data_(user_data) {} void Run(bool capable) { @@ -185,7 +183,7 @@ class WebApplicationCapableGetCallback { } private: - tizen_webview::Web_App_Capable_Get_Callback func_; + Ewk_Web_App_Capable_Get_Callback func_; void *user_data_; }; @@ -194,7 +192,7 @@ class NotificationPermissionCallback { public: NotificationPermissionCallback( Evas_Object* obj, - tizen_webview::View_Notification_Permission_Callback func, + Ewk_View_Notification_Permission_Callback func, void* user_data) : obj_(obj), func_(func), user_data_(user_data) {} bool Run(Ewk_Notification_Permission_Request* request) { @@ -206,7 +204,7 @@ class NotificationPermissionCallback { private: Evas_Object* obj_; - tizen_webview::View_Notification_Permission_Callback func_; + Ewk_View_Notification_Permission_Callback func_; void* user_data_; }; @@ -263,7 +261,7 @@ class EWebView { void SetTextZoomFactor(double text_zoom_factor); void ExecuteEditCommand(const char* command, const char* value); void SetOrientation(int orientation); - void SetOrientationLockCallback(tizen_webview::Orientation_Lock_Cb func, void* data); + void SetOrientationLockCallback(Ewk_Orientation_Lock_Cb func, void* data); bool TouchEventsEnabled() const; void SetTouchEventsEnabled(bool enabled); bool MouseEventsEnabled() const; @@ -271,7 +269,7 @@ class EWebView { void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers); void Show(); void Hide(); - bool ExecuteJavaScript(const char* script, tizen_webview::View_Script_Execute_Callback callback, void* userdata); + bool ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata); bool SetUserAgent(const char* userAgent); bool SetUserAgentAppName(const char* application_name); bool SetPrivateBrowsing(bool incognito); @@ -342,7 +340,7 @@ class EWebView { */ Evas_Object* GetSnapshot(Eina_Rectangle rect); - bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, tizen_webview::Web_App_Screenshot_Captured_Callback callback, void* user_data); + bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data); void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision); void InvokePolicyNavigationCallback(content::RenderViewHost* rvh, NavigationPolicyParams params, bool* handled); @@ -351,25 +349,25 @@ class EWebView { _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode); Eina_Bool AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, - tizen_webview::View_Hit_Test_Request_Callback, + Ewk_View_Hit_Test_Request_Callback, void* user_data); _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x, int y, Ewk_Hit_Test_Mode mode); Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y, Ewk_Hit_Test_Mode mode, - tizen_webview::View_Hit_Test_Request_Callback, + Ewk_View_Hit_Test_Request_Callback, void* user_data); void DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t request_id); void UpdateHitTestData(const Hit_Test_Params& params); int current_find_request_id() const { return current_find_request_id_; } - bool PlainTextGet(tizen_webview::View_Plain_Text_Get_Callback callback, void* user_data); + bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data); void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id); - int SetEwkViewPlainTextGetCallback(tizen_webview::View_Plain_Text_Get_Callback callback, void* user_data); - void SetViewGeolocationPermissionCallback(tizen_webview::View_Geolocation_Permission_Callback callback, void* user_data); - bool InvokeViewGeolocationPermissionCallback(void* geolocation_permission_request_context, Eina_Bool* result); - void SetViewUnfocusAllowCallback(tizen_webview::View_Unfocus_Allow_Callback callback, void* user_data); - bool InvokeViewUnfocusAllowCallback(tizen_webview::Unfocus_Direction direction, Eina_Bool* result); + int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data); + void SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data); + bool InvokeViewGeolocationPermissionCallback(_Ewk_Geolocation_Permission_Request* geolocation_permission_request_context, Eina_Bool* result); + void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data); + bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction, Eina_Bool* result); void DidChangeContentsSize(int width, int height); const Eina_Rectangle GetContentsSize() const; void GetScrollSize(int* w, int* h); @@ -382,27 +380,27 @@ class EWebView { _Ewk_Back_Forward_List* GetBackForwardList() const; void InvokeBackForwardListChangedCallback(); _Ewk_History* GetBackForwardHistory() const; - bool WebAppCapableGet(tizen_webview::Web_App_Capable_Get_Callback callback, void *userData); - bool WebAppIconUrlGet(tizen_webview::Web_App_Icon_URL_Get_Callback callback, void *userData); - bool WebAppIconUrlsGet(tizen_webview::Web_App_Icon_URLs_Get_Callback callback, void *userData); + bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData); + bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData); + bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData); void InvokeWebAppCapableGetCallback(bool capable, int callbackId); void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId); void InvokeWebAppIconUrlsGetCallback(const std::map &iconUrls, int callbackId); - void SetNotificationPermissionCallback(tizen_webview::View_Notification_Permission_Callback callback, void* user_data); + void SetNotificationPermissionCallback(Ewk_View_Notification_Permission_Callback callback, void* user_data); bool IsNotificationPermissionCallbackSet() const; bool InvokeNotificationPermissionCallback(Ewk_Notification_Permission_Request* request); - bool GetMHTMLData(tizen_webview::View_MHTML_Data_Get_Callback callback, void* user_data); + bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data); void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id); bool IsFullscreen(); void ExitFullscreen(); double GetScale(); void DidChangePageScaleFactor(double scale_factor); - void SetJavaScriptAlertCallback(tizen_webview::View_JavaScript_Alert_Callback callback, void* user_data); + void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data); void JavaScriptAlertReply(); - void SetJavaScriptConfirmCallback(tizen_webview::View_JavaScript_Confirm_Callback callback, void* user_data); + void SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data); void JavaScriptConfirmReply(bool result); - void SetJavaScriptPromptCallback(tizen_webview::View_JavaScript_Prompt_Callback callback, void* user_data); + void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data); void JavaScriptPromptReply(const char* result); void set_renderer_crashed(); void GetPageScaleRange(double *min_scale, double *max_scale); diff --git a/tizen_src/ewk/efl_integration/private/api_static_check.cc b/tizen_src/ewk/efl_integration/private/api_static_check.cc deleted file mode 100644 index e638b1e..0000000 --- a/tizen_src/ewk/efl_integration/private/api_static_check.cc +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -#include "public/ewk_view.h" -#include "public/ewk_cookie_manager.h" -#include "tizen_webview/public/tw_callbacks.h" - -#define STATIC_ENUM_IS_EQUAL(left, right) \ - static_assert(static_cast(left) == static_cast(right), \ - "Enum values mismatch") - -void do_static_check() { - STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_NONE, - EWK_UNFOCUS_DIRECTION_NONE); - STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_FORWARD, - EWK_UNFOCUS_DIRECTION_FORWARD); - STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_BACKWARD, - EWK_UNFOCUS_DIRECTION_BACKWARD); - STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_UP, - EWK_UNFOCUS_DIRECTION_UP); - STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_DOWN, - EWK_UNFOCUS_DIRECTION_DOWN); - STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_LEFT, - EWK_UNFOCUS_DIRECTION_LEFT); - STATIC_ENUM_IS_EQUAL(tizen_webview::UNFOCUS_DIRECTION_RIGHT, - EWK_UNFOCUS_DIRECTION_RIGHT); -} diff --git a/tizen_src/ewk/efl_integration/private/chromium_glue.cc b/tizen_src/ewk/efl_integration/private/chromium_glue.cc deleted file mode 100644 index 5bf0a85..0000000 --- a/tizen_src/ewk/efl_integration/private/chromium_glue.cc +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2013 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. - -#include "chromium_glue.h" - -// utility macros for type casting -#include -#include - -#include "base/logging.h" - -#define GLUE_NOTALLOWED(msg) \ - fprintf(stderr, "[GLUE ERROR] %s: %s\n", __PRETTY_FUNCTION__, ""#msg); \ - assert(0);\ - -#define GLUE_CAST_START(type) \ - switch ((type)) {\ - -#define GLUE_CAST_TO(ewk_value, chromium_value) \ - case ewk_value: return chromium_value; - -#define GLUE_CAST_FROM(ewk_value, chromium_value) \ - case chromium_value: return ewk_value; - -#define GLUE_CAST_END() \ - default: \ - GLUE_NOTALLOWED("Invalid EWK<->Chromium type conversion")\ - }\ - -// early return chromium's null value if argval is ewk's null. -// initialize result to chromium's null value otherwise. -#define GLUE_SET_FLAG_TO_INIT(result, argval, ewk_null_value, chromium_null_value)\ - if (argval == (ewk_null_value))\ - return chromium_null_value;\ - int result = (chromium_null_value); - -#define GLUE_SET_FLAG_FROM_INIT(result, argval, ewk_null_value, chromium_null_value)\ - if (argval == (chromium_null_value))\ - return ewk_null_value;\ - int result = (ewk_null_value); - -// turn on chromium_flag in result if (argval & ewk_flag) is true -#define GLUE_SET_FLAG_TO(result, argval, ewk_flag, chromium_flag) \ - if ((argval) & (ewk_flag))\ - result |= (chromium_flag); - -// turn on ewk_flag in result if (argval & chromium_flag) is true -#define GLUE_SET_FLAG_FROM(result, argval, ewk_flag, chromium_flag) \ - if ((argval) & (chromium_flag))\ - result |= (ewk_flag); - - -namespace chromium_glue { - -// To access enum values without namespace -using namespace tizen_webview; - -tw::View_Hit_Test_Request_Callback to(Ewk_View_Hit_Test_Request_Callback callback) -{ - return reinterpret_cast(callback); -} - -} // namespace chromium_glue diff --git a/tizen_src/ewk/efl_integration/private/chromium_glue.h b/tizen_src/ewk/efl_integration/private/chromium_glue.h deleted file mode 100644 index edaa081..0000000 --- a/tizen_src/ewk/efl_integration/private/chromium_glue.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2013 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 CHROMIUM_GLUE_H_ -#define CHROMIUM_GLUE_H_ - -#ifndef __cplusplus -#error "Don't mix C and C++ in using chromium_glue.h" -#endif - -#include "ewk_context.h" -#include "ewk_settings.h" -#include "ewk_hit_test.h" -#include "ewk_touch.h" -#include "ewk_custom_handlers.h" -#include "ewk_view.h" - -#include - -namespace chromium_glue { - -namespace tw = tizen_webview; - -// --- ewk<->chromium type conversion --- -tw::View_Hit_Test_Request_Callback to(Ewk_View_Hit_Test_Request_Callback); - -} // namespace chromium_glue - -#endif // CHROMIUM_GLUE_H_ diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.cc b/tizen_src/ewk/efl_integration/public/ewk_context.cc index 33fc2ea..a5e8a2a 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_context.cc @@ -14,7 +14,6 @@ #include "private/ewk_context_private.h" #include "private/ewk_private.h" #include "private/ewk_security_origin_private.h" -#include "private/chromium_glue.h" #include "private/ewk_favicon_database_private.h" #include "private/ewk_cookie_manager_private.h" #include "private/ewk_context_form_autofill_profile_private.h" diff --git a/tizen_src/ewk/efl_integration/public/ewk_hit_test.cc b/tizen_src/ewk/efl_integration/public/ewk_hit_test.cc index 88c7475..bfdb858 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_hit_test.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_hit_test.cc @@ -7,7 +7,6 @@ #include "eweb_view.h" #include "web_contents_delegate_efl.h" #include "public/ewk_view.h" -#include "private/chromium_glue.h" #include "private/ewk_hit_test_private.h" void ewk_hit_test_free(Ewk_Hit_Test* hitTest) 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 c583dc9..575e0e0 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc @@ -4,7 +4,6 @@ #include "ewk_policy_decision.h" -#include "private/chromium_glue.h" #include "private/ewk_frame_private.h" #include "private/ewk_policy_decision_private.h" #include "private/ewk_private.h" diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.cc b/tizen_src/ewk/efl_integration/public/ewk_settings.cc index 9d97c27..839963f 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_settings.cc @@ -9,7 +9,6 @@ #include "eweb_view.h" #include "ui/events/gesture_detection/gesture_configuration.h" #include "public/text_encoding_map_efl.h" -#include "private/chromium_glue.h" #include "private/ewk_private.h" #include "private/ewk_private.h" #include "private/ewk_settings_private.h" diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.cc b/tizen_src/ewk/efl_integration/public/ewk_view.cc index 8d28c88..26a5f77 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_view.cc @@ -46,7 +46,6 @@ #if !defined(EWK_BRINGUP) #include "private/ewk_quota_permission_request_private.h" #endif -#include "private/chromium_glue.h" #include "private/ewk_back_forward_list_private.h" #include "private/ewk_history_private.h" #include "private/ewk_view_private.h" @@ -638,7 +637,7 @@ Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* ewkView, int x, int y, int hit_ Eina_Bool ewk_view_hit_test_request(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_View_Hit_Test_Request_Callback callback, void* user_data) { EWK_VIEW_IMPL_GET_OR_RETURN(o, impl, EINA_FALSE); - return impl->AsyncRequestHitTestDataAt(x, y, static_cast(hit_test_mode), chromium_glue::to(callback), user_data); + return impl->AsyncRequestHitTestDataAt(x, y, static_cast(hit_test_mode), callback, user_data); } Ewk_History* ewk_view_history_get(Evas_Object* ewkView) @@ -889,16 +888,13 @@ void ewk_view_intercept_request_callback_set (Evas_Object* ewkView, Ewk_View_Int 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); - impl->SetViewUnfocusAllowCallback( - reinterpret_cast - (callback), user_data); + impl->SetViewUnfocusAllowCallback(callback, user_data); } void ewk_view_geolocation_permission_callback_set(Evas_Object* ewk_view, Ewk_View_Geolocation_Permission_Callback callback, void* user_data) { EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl); - impl->SetViewGeolocationPermissionCallback( - reinterpret_cast(callback), user_data); + impl->SetViewGeolocationPermissionCallback(callback, user_data); } void ewk_view_use_settings_font(Evas_Object* ewkView) @@ -983,7 +979,7 @@ Ewk_Back_Forward_List* ewk_view_back_forward_list_get(const Evas_Object* ewkView void ewk_view_notification_permission_callback_set(Evas_Object *o, Ewk_View_Notification_Permission_Callback callback, void *user_data) { EWK_VIEW_IMPL_GET_OR_RETURN(o, impl); - impl->SetNotificationPermissionCallback(reinterpret_cast(callback), user_data); + impl->SetNotificationPermissionCallback(callback, user_data); } void ewk_view_draw_focus_ring_enable_set(Evas_Object* ewkView, Eina_Bool enable) diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_callbacks.h b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_callbacks.h deleted file mode 100644 index 6d84c2e..0000000 --- a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_callbacks.h +++ /dev/null @@ -1,134 +0,0 @@ -// 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_CALLBACKS_H_ -#define TIZEN_WEBVIEW_PUBLIC_TW_CALLBACKS_H_ - -#include - -class Ewk_Notification_Permission_Request; -class _Ewk_Hit_Test; - -namespace tizen_webview { - -// from ewk_context.h -typedef void (*Local_File_System_Origins_Get_Callback)(Eina_List *origins, void *user_data); -typedef void (*Web_Application_Cache_Origins_Get_Callback)(Eina_List* origins, void* user_data); -typedef void (*Web_Application_Cache_Usage_For_Origin_Get_Callback)(int64_t usage, void* user_data); -typedef void (*Web_Database_Origins_Get_Callback)(Eina_List* origins, void* user_data); -typedef void (*Web_Storage_Origins_Get_Callback)(Eina_List* origins, void* user_data); -typedef void (*Context_Did_Start_Download_Callback)(const char* download_url, void* user_data); -typedef void (*Vibration_Client_Vibrate_Cb)(uint64_t vibration_time, void *user_data); -typedef void (*Vibration_Client_Vibration_Cancel_Cb)(void *user_data); -typedef Eina_Bool (*Mime_Override_Callback)(const char *url, const char *current_mime, char **new_mime, void* user_data); -typedef void (*Ewk_Context_Form_Autofill_Profile_Changed_Callback)(void *data); - -/** - * Callback for ewk_view_web_app_capable_get - * - * @param capable web application capable - * @param user_data user_data will be passsed when ewk_view_web_app_capable_get is called - */ -typedef void (*Web_App_Capable_Get_Callback)(Eina_Bool capable, void* user_data); - -/** - * Callback for ewk_view_web_app_icon_get - * - * @param icon_url web application icon - * @param user_data user_data will be passsed when ewk_view_web_app_icon_get is called - */ -typedef void (*Web_App_Icon_URL_Get_Callback)(const char* icon_url, void* user_data); - -/** - * Callback for ewk_view_screenshot_contents_get_async - * - * @param image captured screenshot - * @param user_data user_data will be passsed when ewk_view_screenshot_contents_get_async is called - */ -typedef void (*Web_App_Screenshot_Captured_Callback)(Evas_Object* image, void* user_data); - -/** - * Callback for ewk_view_web_app_icon_urls_get. - * - * @param icon_urls list of Ewk_Web_App_Icon_Data for web app - * @param user_data user_data will be passsed when ewk_view_web_app_icon_urls_get is called - */ -typedef void (*Web_App_Icon_URLs_Get_Callback)(Eina_List *icon_urls, void *user_data); - -/** - * Callback for ewk_view_notification_permission_callback_set - * - * @param o view object to request the notification permission - * @param request Ewk_Notification_Permission_Request object to get the information about notification permission request. - * @param user_data user data - */ -typedef Eina_Bool (*View_Notification_Permission_Callback)(Evas_Object *o, Ewk_Notification_Permission_Request *request, void *user_data); - -/** - * Callback for ewk_view_script_execute - * - * @param o the view object - * @param result_value value returned by script - * @param user_data user data - */ -typedef void (*View_Script_Execute_Callback)(Evas_Object* o, const char* result_value, void* user_data); - -/** - * Callback for ewk_view_plain_text_get - * - * @param o the view object - * @param plain_text the contents of the given frame converted to plain text - * @param user_data user data - */ -typedef void (*View_Plain_Text_Get_Callback)(Evas_Object* o, const char* plain_text, void* user_data); - -/** - * Creates a type name for the callback function used to get the page contents. - * - * @param o view object - * @param data mhtml data of the page contents - * @param user_data user data will be passed when ewk_view_mhtml_data_get is called - */ -typedef void (*View_MHTML_Data_Get_Callback)(Evas_Object *o, const char *data, void *user_data); - - -//typedef Eina_Bool (*View_Password_Confirm_Popup_Callback)(Evas_Object* o, const char* message, void* user_data); -typedef Eina_Bool (*View_JavaScript_Alert_Callback)(Evas_Object* o, const char* alert_text, void* user_data); -typedef Eina_Bool (*View_JavaScript_Confirm_Callback)(Evas_Object* o, const char* message, void* user_data); -/** - * Callback for ewk_view_javascript_prompt_callback_set - * - * @param o the view object - * @param message the text to be displayed on the prompt popup - * @param default_value default text to be entered in the prompt dialog - * @param user_data user data - */ -typedef Eina_Bool (*View_JavaScript_Prompt_Callback)(Evas_Object* o, const char* message, const char* default_value, void* user_data); -//typedef Eina_Bool (*View_Before_Unload_Confirm_Panel_Callback)(Evas_Object* o, const char* message, void* user_data); -//typedef Eina_Bool (*View_Applicacion_Cache_Permission_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, void* user_data); -//typedef Eina_Bool (*View_Exceeded_Indexed_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data); -//typedef Eina_Bool (*View_Exceeded_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, const char* database_name, unsigned long long expectedQuota, void* user_data); -//typedef Eina_Bool (*View_Exceeded_Local_File_System_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data); -typedef Eina_Bool (*Orientation_Lock_Cb)(Evas_Object* o, Eina_Bool need_lock, int orientation, void* user_data); -typedef void (*View_Hit_Test_Request_Callback)(Evas_Object* o, int x, int y, int hit_test_mode, _Ewk_Hit_Test* hit_test, void* user_data); -typedef Eina_Bool (*View_Geolocation_Permission_Callback)(Evas_Object* view, void* geolocation_permission_context, void* user_data); - -// Enum values used to specify focus direction options. -// @brief Provides option to forward focus to app -// @info Keep this in sync with ewk_view.h -enum Unfocus_Direction { - UNFOCUS_DIRECTION_NONE = 0, - UNFOCUS_DIRECTION_FORWARD, - UNFOCUS_DIRECTION_BACKWARD, - UNFOCUS_DIRECTION_UP, - UNFOCUS_DIRECTION_DOWN, - UNFOCUS_DIRECTION_LEFT, - UNFOCUS_DIRECTION_RIGHT, -}; - -typedef Eina_Bool (*View_Unfocus_Allow_Callback)(Evas_Object* o, Unfocus_Direction direction, void* user_data); -} // namespace tizen_webview - -#endif // TIZEN_WEBVIEW_PUBLIC_TW_CALLBACKS_H_ diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.cc b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.cc index 335bbf1..c268b7b 100644 --- a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.cc +++ b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.cc @@ -93,7 +93,7 @@ scoped_refptr WebContext::cookieManager() const { return impl->cookieManager(); } -void WebContext::SetDidStartDownloadCallback(Context_Did_Start_Download_Callback callback, void* user_data) { +void WebContext::SetDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback callback, void* user_data) { impl->SetDidStartDownloadCallback(callback, user_data); } @@ -166,11 +166,11 @@ void WebContext::ClearWebkitCache() { impl->ClearWebkitCache(); } -void WebContext::GetAllOriginsWithApplicationCache(Web_Application_Cache_Origins_Get_Callback callback, void* user_data) { +void WebContext::GetAllOriginsWithApplicationCache(Ewk_Web_Application_Cache_Origins_Get_Callback callback, void* user_data) { impl->GetAllOriginsWithApplicationCache(callback, user_data); } -void WebContext::GetApplicationCacheUsage(const GURL& url, Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data) { +void WebContext::GetApplicationCacheUsage(const GURL& url, Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data) { impl->GetApplicationCacheUsage(url, callback, user_data); } @@ -182,7 +182,7 @@ void WebContext::DeleteApplicationCacheForSite(const GURL& url) { impl->DeleteApplicationCacheForSite(url); } -void WebContext::GetAllOriginsWithWebDB(Web_Database_Origins_Get_Callback callback, void* user_data) { +void WebContext::GetAllOriginsWithWebDB(Ewk_Web_Database_Origins_Get_Callback callback, void* user_data) { impl->GetAllOriginsWithWebDB(callback, user_data); } @@ -194,7 +194,7 @@ void WebContext::IndexedDBDelete() { impl->IndexedDBDelete(); } -void WebContext::WebStorageOriginsAllGet(Web_Storage_Origins_Get_Callback callback, void* user_data) { +void WebContext::WebStorageOriginsAllGet(Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data) { impl->WebStorageOriginsAllGet(callback, user_data); } @@ -206,7 +206,7 @@ void WebContext::WebStorageDelete(const GURL& origin) { impl->WebStorageDeleteForOrigin(origin); } -void WebContext::GetAllOriginsWithFileSystem(Local_File_System_Origins_Get_Callback callback, void* user_data) const { +void WebContext::GetAllOriginsWithFileSystem(Ewk_Local_File_System_Origins_Get_Callback callback, void* user_data) const { impl->GetAllOriginsWithFileSystem(callback, user_data); } @@ -240,7 +240,7 @@ void WebContext::SetPixmap(int pixmap) { impl->SetPixmap( pixmap); } -void WebContext::SetMimeOverrideCallback(Mime_Override_Callback callback, +void WebContext::SetMimeOverrideCallback(Ewk_Context_Override_Mime_For_Url_Callback callback, void* user_data) const { impl->SetMimeOverrideCallback(callback, user_data); } diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.h b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.h index 41ffd53..d75418c 100644 --- a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.h +++ b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_web_context.h @@ -12,7 +12,6 @@ #include "base/memory/ref_counted.h" #include "ewk_enums.h" #include "public/ewk_context.h" -#include "tizen_webview/public/tw_callbacks.h" class CookieManager; class Ewk_Cookie_Manager; @@ -42,7 +41,7 @@ struct WebContext : public base::RefCounted { scoped_refptr cookieManager() const; // Set Callbacks - void SetDidStartDownloadCallback(Context_Did_Start_Download_Callback callback, + void SetDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback callback, void* user_data); //EwkDidStartDownloadCallback* DidStartDownloadCallback(); @@ -74,15 +73,15 @@ struct WebContext : public base::RefCounted { // Application Cache void GetAllOriginsWithApplicationCache( - Web_Application_Cache_Origins_Get_Callback callback, void* user_data); + Ewk_Web_Application_Cache_Origins_Get_Callback callback, void* user_data); void GetApplicationCacheUsage(const GURL& url, - Web_Application_Cache_Usage_For_Origin_Get_Callback callback, + Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data); void DeleteAllApplicationCache(); void DeleteApplicationCacheForSite(const GURL& url); // Web Database - void GetAllOriginsWithWebDB(Web_Database_Origins_Get_Callback callback, + void GetAllOriginsWithWebDB(Ewk_Web_Database_Origins_Get_Callback callback, void* user_data); void WebDBDelete(const GURL& host); @@ -90,7 +89,7 @@ struct WebContext : public base::RefCounted { void IndexedDBDelete(); // Web Storage - void WebStorageOriginsAllGet(Web_Storage_Origins_Get_Callback callback, + void WebStorageOriginsAllGet(Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data); void WebStorageDelete(); void WebStorageDelete(const GURL& origin); @@ -98,7 +97,7 @@ struct WebContext : public base::RefCounted { // File System void GetAllOriginsWithFileSystem( - Local_File_System_Origins_Get_Callback callback, void* user_data) const; + Ewk_Local_File_System_Origins_Get_Callback callback, void* user_data) const; void FileSystemDelete(const GURL& host); // Favicon @@ -118,7 +117,7 @@ struct WebContext : public base::RefCounted { void ClearPasswordData(); // Set MIME override callback - void SetMimeOverrideCallback(Mime_Override_Callback callback, + void SetMimeOverrideCallback(Ewk_Context_Override_Mime_For_Url_Callback callback, void* user_data) const; // Note: Do not use outside chromium diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.cc b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.cc index 6551799..4daa2e5 100644 --- a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.cc +++ b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.cc @@ -205,7 +205,7 @@ const Eina_Rectangle WebView::GetContentsSize() const { return impl_->GetContentsSize(); } -bool WebView::PlainTextGet(View_Plain_Text_Get_Callback callback, void* user_data) { +bool WebView::PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) { return impl_->PlainTextGet(callback, user_data); } @@ -213,11 +213,11 @@ void WebView::InvokePlainTextGetCallback(const std::string& content_text, int pl return impl_->InvokePlainTextGetCallback(content_text, plain_text_get_callback_id); } -int WebView::SetEwkViewPlainTextGetCallback(View_Plain_Text_Get_Callback callback, void* user_data) { +int WebView::SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data) { return impl_->SetEwkViewPlainTextGetCallback(callback, user_data); } -bool WebView::GetMHTMLData(View_MHTML_Data_Get_Callback callback, void* user_data) { +bool WebView::GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data) { return impl_->GetMHTMLData(callback, user_data); } @@ -245,11 +245,11 @@ void WebView::SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type t return impl_->SetContentSecurityPolicy(policy, type); } -void WebView::SetViewGeolocationPermissionCallback(View_Geolocation_Permission_Callback callback, void* user_data) { +void WebView::SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data) { impl_->SetViewGeolocationPermissionCallback(callback, user_data); } -void WebView::SetViewUnfocusAllowCallback(View_Unfocus_Allow_Callback callback, void* user_data){ +void WebView::SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data){ impl_->SetViewUnfocusAllowCallback(callback, user_data); } @@ -305,7 +305,7 @@ void WebView::SetOrientation(int orientation) { return impl_->SetOrientation(orientation); } -void WebView::SetOrientationLockCallback(Orientation_Lock_Cb func, void* data) { +void WebView::SetOrientationLockCallback(Ewk_Orientation_Lock_Cb func, void* data) { return impl_->SetOrientationLockCallback(func, data); } @@ -325,7 +325,7 @@ Evas_Object* WebView::GetSnapshot(Eina_Rectangle rect) { return impl_->GetSnapshot(rect); } -bool WebView::GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Web_App_Screenshot_Captured_Callback callback, void* user_data) { +bool WebView::GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data) { return impl_->GetSnapshotAsync(rect, canvas, callback, user_data); } @@ -349,7 +349,7 @@ _Ewk_Hit_Test* WebView::RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mod return impl_->RequestHitTestDataAt(x, y, mode); } -Eina_Bool WebView::AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, tizen_webview::View_Hit_Test_Request_Callback callback, void* user_data) +Eina_Bool WebView::AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, Ewk_View_Hit_Test_Request_Callback callback, void* user_data) { return impl_->AsyncRequestHitTestDataAt(x, y, mode, callback, user_data); } @@ -426,11 +426,11 @@ void WebView::UpdateWebKitPreferences() { return impl_->UpdateWebKitPreferences(); } -bool WebView::ExecuteJavaScript(const char* script, View_Script_Execute_Callback callback, void* userdata) { +bool WebView::ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata) { return impl_->ExecuteJavaScript(script, callback, userdata); } -void WebView::SetJavaScriptAlertCallback(View_JavaScript_Alert_Callback callback, void* user_data) { +void WebView::SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data) { return impl_->SetJavaScriptAlertCallback(callback, user_data); } @@ -438,7 +438,7 @@ void WebView::JavaScriptAlertReply() { return impl_->JavaScriptAlertReply(); } -void WebView::SetJavaScriptConfirmCallback(View_JavaScript_Confirm_Callback callback, void* user_data) { +void WebView::SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data) { return impl_->SetJavaScriptConfirmCallback(callback, user_data); } @@ -446,7 +446,7 @@ void WebView::JavaScriptConfirmReply(bool result) { return impl_->JavaScriptConfirmReply(result); } -void WebView::SetJavaScriptPromptCallback(View_JavaScript_Prompt_Callback callback, void* user_data) { +void WebView::SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data) { return impl_->SetJavaScriptPromptCallback(callback, user_data); } @@ -454,15 +454,15 @@ void WebView::JavaScriptPromptReply(const char* result) { return impl_->JavaScriptPromptReply(result); } -bool WebView::WebAppCapableGet(Web_App_Capable_Get_Callback callback, void *userData) { +bool WebView::WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData) { return impl_->WebAppCapableGet(callback, userData); } -bool WebView::WebAppIconUrlGet(Web_App_Icon_URL_Get_Callback callback, void *userData) { +bool WebView::WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData) { return impl_->WebAppIconUrlGet(callback, userData); } -bool WebView::WebAppIconUrlsGet(Web_App_Icon_URLs_Get_Callback callback, void *userData) { +bool WebView::WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData) { return impl_->WebAppIconUrlsGet(callback, userData); } @@ -479,7 +479,7 @@ void WebView::InvokeWebAppIconUrlsGetCallback(const std::mapSetNotificationPermissionCallback(callback, user_data); } diff --git a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.h b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.h index 6389702..b7c0a43 100644 --- a/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.h +++ b/tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview.h @@ -12,7 +12,6 @@ #include "base/macros.h" #include "content/public/browser/navigation_controller.h" -#include "tizen_webview/public/tw_callbacks.h" #include "ewk_touch.h" #include "public/ewk_hit_test.h" #include "public/ewk_view.h" @@ -101,10 +100,10 @@ class WebView { // ---- Contents const char* GetTitle(); const Eina_Rectangle GetContentsSize() const; - bool PlainTextGet(View_Plain_Text_Get_Callback callback, void* user_data); + bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data); void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id); - int SetEwkViewPlainTextGetCallback(View_Plain_Text_Get_Callback callback, void* user_data); - bool GetMHTMLData(View_MHTML_Data_Get_Callback callback, void* user_data); + int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data); + bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data); void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id); void SetOverrideEncoding(const std::string& encoding); void ExecuteEditCommand(const char* command, const char* value); @@ -112,8 +111,8 @@ class WebView { void StopFinding(); 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 SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data); + void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data); // ---- View // > View Visibility void Show(); @@ -133,7 +132,7 @@ class WebView { void GetScrollSize(int* w, int* h); // TODO: rename to GetPossibleScrollSize // > View Orientation void SetOrientation(int orientation); - void SetOrientationLockCallback(Orientation_Lock_Cb func, void* data); + void SetOrientationLockCallback(Ewk_Orientation_Lock_Cb func, void* data); // > View mode void SetViewMode(blink::WebViewMode view_mode); bool IsFullscreen(); @@ -141,7 +140,7 @@ class WebView { // > View Snapshot // Get snapshot for given |rect|. Return a new created Evas_Object. Evas_Object* GetSnapshot(Eina_Rectangle rect); - bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Web_App_Screenshot_Captured_Callback callback, void* user_data); + bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data); // > View Misc. void SetDrawsTransparentBackground(bool enabled); @@ -150,7 +149,7 @@ class WebView { void SetTouchEventsEnabled(bool enabled); void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *point, const Evas_Modifier *modifiers); _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode); - Eina_Bool AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, tizen_webview::View_Hit_Test_Request_Callback, void* user_data); + Eina_Bool AsyncRequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode, Ewk_View_Hit_Test_Request_Callback, void* user_data); // ---- Selection void QuerySelectionStyle(); @@ -177,25 +176,25 @@ class WebView { void UpdateWebKitPreferences(); // global? make static //---- JavaScript - bool ExecuteJavaScript(const char* script, View_Script_Execute_Callback callback, void* userdata); - void SetJavaScriptAlertCallback(View_JavaScript_Alert_Callback callback, void* user_data); + bool ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata); + void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data); void JavaScriptAlertReply(); - void SetJavaScriptConfirmCallback(View_JavaScript_Confirm_Callback callback, void* user_data); + void SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data); void JavaScriptConfirmReply(bool result); - void SetJavaScriptPromptCallback(View_JavaScript_Prompt_Callback callback, void* user_data); + void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data); void JavaScriptPromptReply(const char* result); // ---- Web App - bool WebAppCapableGet(Web_App_Capable_Get_Callback callback, void *userData); - bool WebAppIconUrlGet(Web_App_Icon_URL_Get_Callback callback, void *userData); - bool WebAppIconUrlsGet(Web_App_Icon_URLs_Get_Callback callback, void *userData); + bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData); + bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData); + bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData); void InvokeWebAppCapableGetCallback(bool capable, int callbackId); void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId); void InvokeWebAppIconUrlsGetCallback(const std::map &iconUrls, int callbackId); // ---- Notification Permission Request void SetNotificationPermissionCallback( - tizen_webview::View_Notification_Permission_Callback callback, + Ewk_View_Notification_Permission_Callback callback, void* user_data); // ---- Misc. -- 2.7.4