From 63823db6a5a7f0630479bb7b9c2d3b181ed74e3e Mon Sep 17 00:00:00 2001 From: "k2.nagaraju" Date: Fri, 11 May 2018 15:29:28 +0530 Subject: [PATCH] Expose the visibility of classes of chromium for web device api. removed duplicate code from WRT Change-Id: I41ddadd07ef4cdf961a4a470ae311351235b9028 Signed-off-by: k2.nagaraju --- atom/browser/api/atom_api_web_contents.cc | 18 +-- atom/browser/api/atom_api_web_contents.h | 8 +- atom/common/api/api_messages.h | 23 +-- atom/renderer/atom_renderer_client.cc | 18 +-- atom/renderer/atom_renderer_client.h | 2 +- packaging/electron-efl.spec | 3 - tizen/common/common.gyp | 2 - tizen/common/wrt_message_data.cc | 38 ----- tizen/common/wrt_message_data.h | 26 ---- tizen/extensions/common/xwalk_extension_server.cc | 51 +++---- tizen/extensions/common/xwalk_extension_server.h | 17 ++- tizen/extensions/extensions.gyp | 2 + tizen/extensions/renderer/runtime_ipc_client.cc | 54 +++---- tizen/extensions/renderer/runtime_ipc_client.h | 5 +- .../xwalk_extension_renderer_controller.cc | 8 +- .../renderer/xwalk_extension_renderer_controller.h | 5 +- tizen/renderer/injected_bundle.cc | 5 +- tizen/wrt/chromium_wrt.gyp | 55 ------- tizen/wrt/dynamicplugin.cc | 89 ----------- tizen/wrt/dynamicplugin.h | 46 ------ tizen/wrt/v8widget.cc | 92 ------------ tizen/wrt/v8widget.h | 41 ------ tizen/wrt/wrt_dynamicplugin.cc | 164 --------------------- tizen/wrt/wrt_dynamicplugin.h | 71 --------- tizen/wrt/wrt_file_protocol_handler.cc | 110 -------------- tizen/wrt/wrt_file_protocol_handler.h | 46 ------ tizen/wrt/wrt_widget_host.cc | 164 --------------------- tizen/wrt/wrt_widget_host.h | 89 ----------- tizen/wrt/wrtwidget.cc | 97 ------------ tizen/wrt/wrtwidget.h | 45 ------ .../ewk/efl_integration/private/ewk_wrt_private.h | 2 +- .../ewk/efl_integration/wrt/wrt_widget_host.h | 2 +- .../tizen_src/ewk/efl_integration/wrt/wrtwidget.h | 2 +- wrt.gyp | 2 +- 34 files changed, 104 insertions(+), 1298 deletions(-) delete mode 100644 tizen/common/wrt_message_data.cc delete mode 100644 tizen/common/wrt_message_data.h delete mode 100644 tizen/wrt/chromium_wrt.gyp delete mode 100644 tizen/wrt/dynamicplugin.cc delete mode 100644 tizen/wrt/dynamicplugin.h delete mode 100644 tizen/wrt/v8widget.cc delete mode 100644 tizen/wrt/v8widget.h delete mode 100644 tizen/wrt/wrt_dynamicplugin.cc delete mode 100644 tizen/wrt/wrt_dynamicplugin.h delete mode 100644 tizen/wrt/wrt_file_protocol_handler.cc delete mode 100644 tizen/wrt/wrt_file_protocol_handler.h delete mode 100644 tizen/wrt/wrt_widget_host.cc delete mode 100644 tizen/wrt/wrt_widget_host.h delete mode 100644 tizen/wrt/wrtwidget.cc delete mode 100644 tizen/wrt/wrtwidget.h diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 8474a5b..cac60af 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -903,21 +903,21 @@ void WebContents::DevToolsClosed() { Emit("devtools-closed"); } -void WebContents::OnWrtPluginMessage(const Wrt_Message_Data& data) { - Wrt_Message_Data tmp = data; +void WebContents::OnWrtPluginMessage(const Ewk_Wrt_Message_Data& data) { + Ewk_Wrt_Message_Data tmp = data; HandleWrtPluginMessage(&tmp); } -void WebContents::OnWrtPluginSyncMessage(const Wrt_Message_Data& data, +void WebContents::OnWrtPluginSyncMessage(const Ewk_Wrt_Message_Data& data, IPC::Message* reply) { - Wrt_Message_Data tmp = data; + Ewk_Wrt_Message_Data tmp = data; HandleWrtPluginMessage(&tmp); - EwkHostMsg_WrtSyncMessage::WriteReplyParams(reply, tmp.value); + AtomHostMsg_WrtSyncMessage::WriteReplyParams(reply, tmp.value); Send(reply); } -void WebContents::HandleWrtPluginMessage(Wrt_Message_Data* msg) { - Eina_Stringshare* msg_type = msg->GetType(); +void WebContents::HandleWrtPluginMessage(Ewk_Wrt_Message_Data* msg) { + Eina_Stringshare* msg_type = ewk_ipc_wrt_message_data_type_get(msg); #define TYPE_BEGIN(x) (!strncmp(msg_type, x, strlen(x))) #define TYPE_IS(x) (!strcmp(msg_type, x)) @@ -940,8 +940,8 @@ bool WebContents::OnMessageReceived(const IPC::Message& message) { OnSetTemporaryZoomLevel) IPC_MESSAGE_HANDLER_DELAY_REPLY(AtomViewHostMsg_GetZoomLevel, OnGetZoomLevel) - IPC_MESSAGE_HANDLER(EwkHostMsg_WrtMessage, OnWrtPluginMessage) - IPC_MESSAGE_HANDLER_DELAY_REPLY(EwkHostMsg_WrtSyncMessage, OnWrtPluginSyncMessage) + IPC_MESSAGE_HANDLER(AtomHostMsg_WrtMessage, OnWrtPluginMessage) + IPC_MESSAGE_HANDLER_DELAY_REPLY(AtomHostMsg_WrtSyncMessage, OnWrtPluginSyncMessage) // FIXME: Disable OnCursorChange due to stach_chk_fail crash. // IPC_MESSAGE_HANDLER_CODE(ViewHostMsg_SetCursor, OnCursorChange, // handled = false) diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 4407b3c..ef1578c 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -18,7 +18,7 @@ #include "content/public/browser/web_contents_observer.h" #include "content/public/common/favicon_url.h" #include "native_mate/handle.h" -#include "tizen/common/wrt_message_data.h" +#include "tizen_src/ewk/efl_integration/private/ewk_wrt_private.h" #include "ui/gfx/image/image.h" namespace blink { @@ -218,10 +218,10 @@ class WebContents : public mate::TrackableObject, v8::Local Debugger(v8::Isolate* isolate); WebContentsZoomController* GetZoomController() { return zoom_controller_; } - void OnWrtPluginMessage(const Wrt_Message_Data& data); - void OnWrtPluginSyncMessage(const Wrt_Message_Data& data, + void OnWrtPluginMessage(const Ewk_Wrt_Message_Data& data); + void OnWrtPluginSyncMessage(const Ewk_Wrt_Message_Data& data, IPC::Message* reply); - void HandleWrtPluginMessage(Wrt_Message_Data* msg); + void HandleWrtPluginMessage(Ewk_Wrt_Message_Data* msg); protected: WebContents(v8::Isolate* isolate, content::WebContents* web_contents, diff --git a/atom/common/api/api_messages.h b/atom/common/api/api_messages.h index cffc9df..5052c40 100644 --- a/atom/common/api/api_messages.h +++ b/atom/common/api/api_messages.h @@ -9,7 +9,7 @@ #include "base/values.h" #include "content/public/common/common_param_traits.h" #include "ipc/ipc_message_macros.h" -#include "tizen/common/wrt_message_data.h" +#include "tizen_src/ewk/efl_integration/private/ewk_wrt_private.h" #include "ui/gfx/ipc/gfx_param_traits.h" // The message starter should be declared in ipc/ipc_message_start.h. Since @@ -22,7 +22,7 @@ IPC_STRUCT_TRAITS_BEGIN(atom::DraggableRegion) IPC_STRUCT_TRAITS_MEMBER(bounds) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(Wrt_Message_Data) +IPC_STRUCT_TRAITS_BEGIN(Ewk_Wrt_Message_Data) IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_MEMBER(value) IPC_STRUCT_TRAITS_MEMBER(id) @@ -58,20 +58,9 @@ IPC_SYNC_MESSAGE_ROUTED1_1(AtomViewHostMsg_SetTemporaryZoomLevel, // Sent by renderer to get the zoom level. IPC_SYNC_MESSAGE_ROUTED0_1(AtomViewHostMsg_GetZoomLevel, double /* result */) -IPC_MESSAGE_ROUTED1(EwkHostMsg_WrtMessage, - Wrt_Message_Data /* data */) +IPC_MESSAGE_ROUTED1(AtomHostMsg_WrtMessage, + Ewk_Wrt_Message_Data /* data */) -IPC_MESSAGE_CONTROL1(WrtMsg_SendWrtMessage, - Wrt_Message_Data /* data */) - -IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrl, - int, // result: request_id - GURL) // result: url - -IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrlResponse, - int, // result: request_id - GURL) // result: url - -IPC_SYNC_MESSAGE_ROUTED1_1(EwkHostMsg_WrtSyncMessage, - Wrt_Message_Data /* data */, +IPC_SYNC_MESSAGE_ROUTED1_1(AtomHostMsg_WrtSyncMessage, + Ewk_Wrt_Message_Data /* data */, std::string /*result*/) diff --git a/atom/renderer/atom_renderer_client.cc b/atom/renderer/atom_renderer_client.cc index 77b5eb0..aa3b881 100644 --- a/atom/renderer/atom_renderer_client.cc +++ b/atom/renderer/atom_renderer_client.cc @@ -13,6 +13,7 @@ #include "content/common/wrt/wrt_url_parse.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view.h" +#include "tizen_src/ewk/efl_integration/wrt/wrtwidget.h" #include "third_party/WebKit/public/web/WebView.h" #endif #include "atom_natives.h" // NOLINT: This file is generated with js2c @@ -58,22 +59,6 @@ const char** StringVectorToArgArray( } // namespace -class WrtUrlParseImpl : public content::WrtUrlParseBase { - public: - WrtUrlParseImpl(WrtWidget* wrt_widget) : wrt_widget_(wrt_widget) {} - GURL parseUrl(const GURL& old_url) const override { - if (!wrt_widget_->IsWidgetInfoSet()) - return old_url; - GURL new_url; - bool is_decrypted_file = false; - wrt_widget_->ParseUrl(old_url, new_url, is_decrypted_file); - return new_url; - } - - private: - WrtWidget* wrt_widget_; -}; - AtomRendererClient::AtomRendererClient() : node_integration_initialized_(false), node_bindings_(NodeBindings::Create(NodeBindings::RENDERER)), @@ -105,7 +90,6 @@ void AtomRendererClient::RenderThreadStarted() { widget_.reset(wrt_widget); content::RenderThread* thread = content::RenderThread::Get(); thread->AddObserver(wrt_widget->GetObserver()); - wrt_url_parser_.reset(new WrtUrlParseImpl(wrt_widget)); std::string theme = command_line->GetSwitchValueASCII("widget-theme"); std::string encoded_bundle = command_line->GetSwitchValueASCII("widget-encoded-bundle"); std::string scale = command_line->GetSwitchValueASCII("widget-scale"); diff --git a/atom/renderer/atom_renderer_client.h b/atom/renderer/atom_renderer_client.h index 0e623b5..2818ecc 100644 --- a/atom/renderer/atom_renderer_client.h +++ b/atom/renderer/atom_renderer_client.h @@ -9,7 +9,7 @@ #include #include "atom/renderer/renderer_client_base.h" -#include "tizen/wrt/wrtwidget.h" +#include "tizen_src/ewk/efl_integration/wrt/wrtwidget.h" namespace atom { diff --git a/packaging/electron-efl.spec b/packaging/electron-efl.spec index bafe82b..7e464c1 100755 --- a/packaging/electron-efl.spec +++ b/packaging/electron-efl.spec @@ -140,8 +140,6 @@ mkdir -p %{buildroot}%{extension_path} install -p -m 644 %{_out}/lib/libxwalk_extension_shared.so %{buildroot}%{_libdir} # xwalk_injected_bundle install -p -m 755 %{_out}/lib/libxwalk_injected_bundle.so %{buildroot}%{_libdir} -# wrt chromium shared -install -p -m 644 %{_out}/lib/libchromium_wrt_shared.so %{buildroot}%{_libdir} %post # Owner account can't write /opt/usr/home/owner/data/org.tizen.electron-efl # which is created in 'install'. So we should copy resources in 'post'. @@ -174,4 +172,3 @@ rm -fr %{buildroot} %attr(644,root,root) %{_libdir}/libwrt_common.so %attr(644,root,root) %{_libdir}/libxwalk_extension_shared.so %attr(644,root,root) %{_libdir}/libxwalk_injected_bundle.so -%attr(644,root,root) %{_libdir}/libchromium_wrt_shared.so diff --git a/tizen/common/common.gyp b/tizen/common/common.gyp index be5a8ec..7706dd2 100644 --- a/tizen/common/common.gyp +++ b/tizen/common/common.gyp @@ -34,8 +34,6 @@ 'resource_manager.cc', 'platform_info.h', 'platform_info.cc', - 'wrt_message_data.h', - 'wrt_message_data.cc', ], 'cflags': [ '-fvisibility=default', diff --git a/tizen/common/wrt_message_data.cc b/tizen/common/wrt_message_data.cc deleted file mode 100644 index 7b60902..0000000 --- a/tizen/common/wrt_message_data.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include "wrt_message_data.h" - -Wrt_Message_Data::Wrt_Message_Data() {} - -Wrt_Message_Data::~Wrt_Message_Data() {} - -Eina_Stringshare* Wrt_Message_Data::GetType() const { - return eina_stringshare_add(type.c_str()); -} - -void Wrt_Message_Data::SetType(const char* val) { - type = val; -} - -Eina_Stringshare* Wrt_Message_Data::GetValue() const { - return eina_stringshare_add(value.c_str()); -} - -void Wrt_Message_Data::SetValue(const char* val) { - value = val; -} - -Eina_Stringshare* Wrt_Message_Data::GetId() const { - return eina_stringshare_add(id.c_str()); -} - -void Wrt_Message_Data::SetId(const char* val) { - id = val; -} - -Eina_Stringshare* Wrt_Message_Data::GetReferenceId() const { - return eina_stringshare_add(reference_id.c_str()); -} - -void Wrt_Message_Data::SetReferenceId(const char* val) { - reference_id = val; -} - diff --git a/tizen/common/wrt_message_data.h b/tizen/common/wrt_message_data.h deleted file mode 100644 index 81e7213..0000000 --- a/tizen/common/wrt_message_data.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef WRT_MESSAGE_DATA_H -#define WRT_MESSAGE_DATA_H - -#include -#include - -struct Wrt_Message_Data { - std::string type; - std::string value; - std::string id; - std::string reference_id; - - Wrt_Message_Data(); - ~Wrt_Message_Data(); - const Eina_Stringshare* GetType() const; - void SetType(const char* val); - const Eina_Stringshare* GetValue() const; - void SetValue(const char* val); - const Eina_Stringshare* GetId() const; - void SetId(const char* val); - const Eina_Stringshare* GetReferenceId() const; - void SetReferenceId(const char* val); -}; - -#endif // WRT_MESSAGE_DATA_H - diff --git a/tizen/extensions/common/xwalk_extension_server.cc b/tizen/extensions/common/xwalk_extension_server.cc index 3cf0acd..06c45e0 100644 --- a/tizen/extensions/common/xwalk_extension_server.cc +++ b/tizen/extensions/common/xwalk_extension_server.cc @@ -15,7 +15,7 @@ #include "content/public/browser/render_process_host.h" #include "extensions/common/constants.h" #include "extensions/common/xwalk_extension_manager.h" -#include "wrt/wrt_widget_host.h" +#include "tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h" namespace extensions { @@ -83,12 +83,12 @@ std::string XWalkExtensionServer::CreateInstance( instance_id = common::utils::GenerateUUID(); instance->SetPostMessageCallback( [this, instance_id](const std::string& msg) { - Wrt_Message_Data* ans = new Wrt_Message_Data(); - ans->SetType(kMethodPostMessageToJS); - ans->SetId(instance_id.c_str()); - ans->SetValue(msg.c_str()); + Ewk_IPC_Wrt_Message_Data* ans = ewk_ipc_wrt_message_data_new(); + ewk_ipc_wrt_message_data_type_set(ans, kMethodPostMessageToJS); + ewk_ipc_wrt_message_data_id_set(ans, instance_id.c_str()); + ewk_ipc_wrt_message_data_value_set(ans, msg.c_str()); WrtWidgetHost::Get()->SendWrtMessage(*ans); - delete ans; + ewk_ipc_wrt_message_data_del(ans); }); instances_[instance_id] = instance; @@ -103,12 +103,13 @@ std::string XWalkExtensionServer::CreateInstance( return instance_id; } -void XWalkExtensionServer::HandleIPCMessage(Wrt_Message_Data* data) { +void XWalkExtensionServer::HandleIPCMessage(Ewk_IPC_Wrt_Message_Data* data) { if (!data) { LOGGER(ERROR) << "Invalid parameter. data is NULL."; return; } - Eina_Stringshare* msg_type = data->GetType(); + + Eina_Stringshare* msg_type = ewk_ipc_wrt_message_data_type_get(data); #define TYPE_IS(x) (!strcmp(msg_type, x)) if (TYPE_IS(kMethodGetExtensions)) { @@ -129,27 +130,27 @@ void XWalkExtensionServer::HandleIPCMessage(Wrt_Message_Data* data) { #undef TYPE_IS } -void XWalkExtensionServer::HandleGetExtensions(Wrt_Message_Data* data) { +void XWalkExtensionServer::HandleGetExtensions(Ewk_IPC_Wrt_Message_Data* data) { Json::Value reply = GetExtensions(); Json::FastWriter writer; std::string reply_str = writer.write(reply); - data->SetValue(reply_str.c_str()); + ewk_ipc_wrt_message_data_value_set(data, reply_str.c_str()); } void XWalkExtensionServer::HandleCreateInstance( - Wrt_Message_Data* data) { - Eina_Stringshare* extension_name = data->GetValue(); + Ewk_IPC_Wrt_Message_Data* data) { + Eina_Stringshare* extension_name = ewk_ipc_wrt_message_data_value_get(data); std::string instance_id = CreateInstance(extension_name); - data->SetValue(instance_id.c_str()); + ewk_ipc_wrt_message_data_value_set(data, instance_id.c_str()); eina_stringshare_del(extension_name); } void XWalkExtensionServer::HandleDestroyInstance( - Wrt_Message_Data* data) { - Eina_Stringshare* instance_id = data->GetId(); + Ewk_IPC_Wrt_Message_Data* data) { + Eina_Stringshare* instance_id = ewk_ipc_wrt_message_data_id_get(data); auto it = instances_.find(instance_id); if (it != instances_.end()) { @@ -164,12 +165,12 @@ void XWalkExtensionServer::HandleDestroyInstance( } void XWalkExtensionServer::HandlePostMessageToNative( - Wrt_Message_Data* data) { - Eina_Stringshare* instance_id = data->GetId(); + Ewk_IPC_Wrt_Message_Data* data) { + Eina_Stringshare* instance_id = ewk_ipc_wrt_message_data_id_get(data); auto it = instances_.find(instance_id); if (it != instances_.end()) { - Eina_Stringshare* msg = data->GetValue(); + Eina_Stringshare* msg = ewk_ipc_wrt_message_data_value_get(data); XWalkExtensionInstance* instance = it->second; instance->HandleMessage(msg); eina_stringshare_del(msg); @@ -181,19 +182,19 @@ void XWalkExtensionServer::HandlePostMessageToNative( } void XWalkExtensionServer::HandleSendSyncMessageToNative( - Wrt_Message_Data* data) { - Eina_Stringshare* instance_id = data->GetId(); + Ewk_IPC_Wrt_Message_Data* data) { + Eina_Stringshare* instance_id = ewk_ipc_wrt_message_data_id_get(data); auto it = instances_.find(instance_id); if (it != instances_.end()) { - Eina_Stringshare* msg = data->GetValue(); + Eina_Stringshare* msg = ewk_ipc_wrt_message_data_value_get(data); XWalkExtensionInstance* instance = it->second; std::string reply; instance->SetSendSyncReplyCallback([&reply](const std::string& msg) { reply = msg; }); instance->HandleSyncMessage(msg); - data->SetValue(reply.c_str()); + ewk_ipc_wrt_message_data_value_set(data, reply.c_str()); eina_stringshare_del(msg); } else { LOGGER(ERROR) << "No such instance '" << instance_id << "'"; @@ -203,12 +204,12 @@ void XWalkExtensionServer::HandleSendSyncMessageToNative( } void XWalkExtensionServer::HandleGetAPIScript( - Wrt_Message_Data* data) { - Eina_Stringshare* extension_name = data->GetValue(); + Ewk_IPC_Wrt_Message_Data* data) { + Eina_Stringshare* extension_name = ewk_ipc_wrt_message_data_value_get(data); std::string api = GetAPIScript(extension_name); - data->SetValue(api.c_str()); + ewk_ipc_wrt_message_data_value_set(data, api.c_str()); eina_stringshare_del(extension_name); } diff --git a/tizen/extensions/common/xwalk_extension_server.h b/tizen/extensions/common/xwalk_extension_server.h index 7a45752..a778a5b 100644 --- a/tizen/extensions/common/xwalk_extension_server.h +++ b/tizen/extensions/common/xwalk_extension_server.h @@ -5,11 +5,12 @@ #ifndef XWALK_EXTENSIONS_XWALK_EXTENSION_SERVER_H_ #define XWALK_EXTENSIONS_XWALK_EXTENSION_SERVER_H_ +#include +#include #include #include #include -#include "common/wrt_message_data.h" #include "extensions/common/xwalk_extension_manager.h" #include "extensions/common/xwalk_extension_instance.h" @@ -24,7 +25,7 @@ class XWalkExtensionServer { std::string GetAPIScript(const std::string& extension_name); std::string CreateInstance(const std::string& extension_name); - void HandleIPCMessage(Wrt_Message_Data* data); + void HandleIPCMessage(Ewk_IPC_Wrt_Message_Data* data); void Shutdown(); void LoadUserExtensions(const std::string app_path); @@ -33,12 +34,12 @@ class XWalkExtensionServer { XWalkExtensionServer(); virtual ~XWalkExtensionServer(); - void HandleGetExtensions(Wrt_Message_Data* data); - void HandleCreateInstance(Wrt_Message_Data* data); - void HandleDestroyInstance(Wrt_Message_Data* data); - void HandlePostMessageToNative(Wrt_Message_Data* data); - void HandleSendSyncMessageToNative(Wrt_Message_Data* data); - void HandleGetAPIScript(Wrt_Message_Data* data); + void HandleGetExtensions(Ewk_IPC_Wrt_Message_Data* data); + void HandleCreateInstance(Ewk_IPC_Wrt_Message_Data* data); + void HandleDestroyInstance(Ewk_IPC_Wrt_Message_Data* data); + void HandlePostMessageToNative(Ewk_IPC_Wrt_Message_Data* data); + void HandleSendSyncMessageToNative(Ewk_IPC_Wrt_Message_Data* data); + void HandleGetAPIScript(Ewk_IPC_Wrt_Message_Data* data); typedef std::map InstanceMap; diff --git a/tizen/extensions/extensions.gyp b/tizen/extensions/extensions.gyp index 163361d..652dfd1 100644 --- a/tizen/extensions/extensions.gyp +++ b/tizen/extensions/extensions.gyp @@ -49,6 +49,8 @@ '.', '../..', '<(libchromiumcontent_src_dir)', + '<(libchromiumcontent_src_dir)/tizen_src/ewk/efl_integration', + '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl', '<(SHARED_INTERMEDIATE_DIR)', '<(libchromiumcontent_src_dir)/gen', '<(libchromiumcontent_src_dir)/third_party/skia/include/config', diff --git a/tizen/extensions/renderer/runtime_ipc_client.cc b/tizen/extensions/renderer/runtime_ipc_client.cc index f64676b..036dc7f 100644 --- a/tizen/extensions/renderer/runtime_ipc_client.cc +++ b/tizen/extensions/renderer/runtime_ipc_client.cc @@ -115,16 +115,16 @@ void RuntimeIPCClient::SendMessage(v8::Handle context, return; } - Wrt_Message_Data* msg = new Wrt_Message_Data(); - msg->SetType(type.c_str()); - msg->SetId(id.c_str()); - msg->SetValue(value.c_str()); - msg->SetReferenceId(ref_id.c_str()); + Ewk_IPC_Wrt_Message_Data* msg = ewk_ipc_wrt_message_data_new(); + ewk_ipc_wrt_message_data_type_set(msg, type.c_str()); + ewk_ipc_wrt_message_data_id_set(msg, id.c_str()); + ewk_ipc_wrt_message_data_reference_id_set(msg, ref_id.c_str()); + ewk_ipc_wrt_message_data_value_set(msg, value.c_str()); content::RenderView* render_view = content::RenderView::FromRoutingID(routing_id); render_view->Send( - new EwkHostMsg_WrtMessage(render_view->GetRoutingID(), *msg)); - delete msg; + new AtomHostMsg_WrtMessage(render_view->GetRoutingID(), *msg)); + ewk_ipc_wrt_message_data_del(msg); } std::string RuntimeIPCClient::SendSyncMessage(v8::Handle context, @@ -151,20 +151,22 @@ std::string RuntimeIPCClient::SendSyncMessage(v8::Handle context, return std::string(); } - Wrt_Message_Data* msg = new Wrt_Message_Data(); - msg->SetType(type.c_str()); - msg->SetId(id.c_str()); - msg->SetValue(value.c_str()); - msg->SetReferenceId(ref_id.c_str()); + Ewk_IPC_Wrt_Message_Data* msg = ewk_ipc_wrt_message_data_new(); + ewk_ipc_wrt_message_data_type_set(msg, type.c_str()); + ewk_ipc_wrt_message_data_id_set(msg, id.c_str()); + ewk_ipc_wrt_message_data_reference_id_set(msg, ref_id.c_str()); + ewk_ipc_wrt_message_data_value_set(msg, value.c_str()); + content::RenderView* render_view = content::RenderView::FromRoutingID(routing_id); render_view->Send( - new EwkHostMsg_WrtSyncMessage(render_view->GetRoutingID(), *msg, &msg->value)); - Eina_Stringshare* msg_value = msg->GetValue(); + new AtomHostMsg_WrtSyncMessage(render_view->GetRoutingID(), *msg, &msg->value)); + + Eina_Stringshare* msg_value = ewk_ipc_wrt_message_data_value_get(msg); std::string result(msg_value); eina_stringshare_del(msg_value); - delete msg; + ewk_ipc_wrt_message_data_del(msg); return result; } @@ -181,27 +183,29 @@ void RuntimeIPCClient::SendAsyncMessage(v8::Handle context, std::string msg_id = common::utils::GenerateUUID(); - Wrt_Message_Data* msg = new Wrt_Message_Data(); - msg->SetType(type.c_str()); - msg->SetId(msg_id.c_str()); - msg->SetValue(value.c_str()); + Ewk_IPC_Wrt_Message_Data* msg = ewk_ipc_wrt_message_data_new(); + ewk_ipc_wrt_message_data_id_set(msg, msg_id.c_str()); + ewk_ipc_wrt_message_data_type_set(msg, type.c_str()); + ewk_ipc_wrt_message_data_value_set(msg, value.c_str()); + content::RenderView* render_view = content::RenderView::FromRoutingID(routing_id); render_view->Send( - new EwkHostMsg_WrtMessage(render_view->GetRoutingID(), *msg)); + new AtomHostMsg_WrtMessage(render_view->GetRoutingID(), *msg)); + callbacks_[msg_id] = callback; - delete msg; + ewk_ipc_wrt_message_data_del(msg); } void RuntimeIPCClient::HandleMessageFromRuntime( - const Wrt_Message_Data* msg) { + const Ewk_IPC_Wrt_Message_Data* msg) { if (msg == NULL) { LOGGER(ERROR) << "received message is NULL"; return; } - Eina_Stringshare* msg_refid = msg->GetReferenceId(); + Eina_Stringshare* msg_refid = ewk_ipc_wrt_message_data_reference_id_get(msg); if (msg_refid == NULL || !strcmp(msg_refid, "")) { if (msg_refid) eina_stringshare_del(msg_refid); @@ -216,8 +220,8 @@ void RuntimeIPCClient::HandleMessageFromRuntime( return; } - Eina_Stringshare* msg_type = msg->GetType(); - Eina_Stringshare* msg_value = msg->GetValue(); + Eina_Stringshare* msg_type = ewk_ipc_wrt_message_data_type_get(msg); + Eina_Stringshare* msg_value = ewk_ipc_wrt_message_data_value_get(msg); ReplyCallback func = it->second; if (func) { diff --git a/tizen/extensions/renderer/runtime_ipc_client.h b/tizen/extensions/renderer/runtime_ipc_client.h index 8f40d16..ab28489 100644 --- a/tizen/extensions/renderer/runtime_ipc_client.h +++ b/tizen/extensions/renderer/runtime_ipc_client.h @@ -17,12 +17,13 @@ #ifndef XWALK_EXTENSIONS_RENDERER_RUNTIME_IPC_CLIENT_H_ #define XWALK_EXTENSIONS_RENDERER_RUNTIME_IPC_CLIENT_H_ +#include +#include #include #include #include #include -#include "common/wrt_message_data.h" namespace extensions { @@ -82,7 +83,7 @@ class RuntimeIPCClient { const std::string& type, const std::string& value, ReplyCallback callback); - void HandleMessageFromRuntime(const Wrt_Message_Data* msg); + void HandleMessageFromRuntime(const Ewk_Wrt_Message_Data* msg); int GetRoutingId(v8::Handle context); diff --git a/tizen/extensions/renderer/xwalk_extension_renderer_controller.cc b/tizen/extensions/renderer/xwalk_extension_renderer_controller.cc index 982ab23..2c0a6e2 100644 --- a/tizen/extensions/renderer/xwalk_extension_renderer_controller.cc +++ b/tizen/extensions/renderer/xwalk_extension_renderer_controller.cc @@ -100,14 +100,14 @@ void XWalkExtensionRendererController::WillReleaseScriptContext( } void XWalkExtensionRendererController::OnReceivedIPCMessage( - const Wrt_Message_Data* data) { + const Ewk_IPC_Wrt_Message_Data* data) { - Eina_Stringshare* type = data->GetType(); + Eina_Stringshare* type = ewk_ipc_wrt_message_data_type_get(data); #define TYPE_BEGIN(x) (!strncmp(type, x, strlen(x))) if (TYPE_BEGIN("xwalk://")) { - Eina_Stringshare* id = data->GetId(); - Eina_Stringshare* msg = data->GetValue(); + Eina_Stringshare* id = ewk_ipc_wrt_message_data_id_get(data); + Eina_Stringshare* msg = ewk_ipc_wrt_message_data_value_get(data); extensions_client_->OnReceivedIPCMessage(id, msg); eina_stringshare_del(id); eina_stringshare_del(msg); diff --git a/tizen/extensions/renderer/xwalk_extension_renderer_controller.h b/tizen/extensions/renderer/xwalk_extension_renderer_controller.h index 8fe5ff4..86e66fb 100644 --- a/tizen/extensions/renderer/xwalk_extension_renderer_controller.h +++ b/tizen/extensions/renderer/xwalk_extension_renderer_controller.h @@ -6,11 +6,12 @@ #ifndef XWALK_EXTENSIONS_RENDERER_XWALK_EXTENSION_RENDERER_CONTROLLER_H_ #define XWALK_EXTENSIONS_RENDERER_XWALK_EXTENSION_RENDERER_CONTROLLER_H_ +#include +#include #include #include #include -#include "common/wrt_message_data.h" namespace extensions { @@ -24,7 +25,7 @@ class XWalkExtensionRendererController { void DidCreateScriptContext(v8::Handle context); void WillReleaseScriptContext(v8::Handle context); - void OnReceivedIPCMessage(const Wrt_Message_Data* data); + void OnReceivedIPCMessage(const Ewk_Wrt_Message_Data* data); void InitializeExtensionClient(); void LoadUserExtensions(const std::string app_path); diff --git a/tizen/renderer/injected_bundle.cc b/tizen/renderer/injected_bundle.cc index cce38e6..e3ee3c9 100644 --- a/tizen/renderer/injected_bundle.cc +++ b/tizen/renderer/injected_bundle.cc @@ -15,6 +15,8 @@ */ #include +#include +#include #include #include #include @@ -28,7 +30,6 @@ #include "common/profiler.h" #include "common/resource_manager.h" #include "common/string_utils.h" -#include "common/wrt_message_data.h" #include "extensions/renderer/runtime_ipc_client.h" #include "extensions/renderer/widget_module.h" #include "extensions/renderer/xwalk_extension_renderer_controller.h" @@ -172,7 +173,7 @@ extern "C" void DynamicDatabaseAttach(int /*attach*/) { // LOGGER(DEBUG) << "InjectedBundle::DynamicDatabaseAttach !!"; } -extern "C" void DynamicOnIPCMessage(const Wrt_Message_Data& data) { +extern "C" void DynamicOnIPCMessage(const Ewk_Wrt_Message_Data& data) { SCOPE_PROFILE(); extensions::XWalkExtensionRendererController& controller = extensions::XWalkExtensionRendererController::GetInstance(); diff --git a/tizen/wrt/chromium_wrt.gyp b/tizen/wrt/chromium_wrt.gyp deleted file mode 100644 index 4680117..0000000 --- a/tizen/wrt/chromium_wrt.gyp +++ /dev/null @@ -1,55 +0,0 @@ -{ - 'includes':[ - '../build/common.gypi', - ], - 'targets': [ - { - 'target_name': 'chromium_wrt_shared', - 'type': 'shared_library', - 'sources': [ - "dynamicplugin.cc", - "dynamicplugin.h", - "v8widget.cc", - "v8widget.h", - "wrtwidget.cc", - "wrtwidget.h", - "wrt_dynamicplugin.cc", - "wrt_dynamicplugin.h", - "wrt_file_protocol_handler.cc", - "wrt_file_protocol_handler.h", - "wrt_widget_host.cc", - "wrt_widget_host.h", - ], - 'cflags': [ - '-fvisibility=default', - ], - 'variables': { - 'packages': [ - 'chromium-efl', - 'elementary', - ], - }, - 'include_dirs': [ - '.', - '../', - '../..', - '../tizen', - '<(libchromiumcontent_src_dir)', - '<(SHARED_INTERMEDIATE_DIR)', - '<(libchromiumcontent_src_dir)/gen', - '<(libchromiumcontent_src_dir)/third_party/skia/include/config', - '<(libchromiumcontent_src_dir)/third_party/skia/include/core', - ], - 'direct_dependent_settings': { -# 'libraries': [ -# '-lchromium_wrt_shared', -# ], - 'variables': { - 'packages': [ - 'jsoncpp', - ], - }, - }, - }, # end of target 'xwalk_extension_static' - ], # end of targets -} diff --git a/tizen/wrt/dynamicplugin.cc b/tizen/wrt/dynamicplugin.cc deleted file mode 100644 index 9512d3e..0000000 --- a/tizen/wrt/dynamicplugin.cc +++ /dev/null @@ -1,89 +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 "dynamicplugin.h" - -#include - -#include "base/command_line.h" -#include "base/logging.h" - -namespace { -const char* const VERSION_FUNCTION = "DynamicPluginVersion"; -const char* const START_SESSION_FUNCTION = "DynamicPluginStartSession"; -const char* const STOP_SESSION_FUNCTION = "DynamicPluginStopSession"; -} - -DynamicPlugin::DynamicPlugin() - : m_handle_(0), - m_version_(0), - m_versionFunction_(0), - m_startSession_(0), - m_stopSession_(0) { - const base::CommandLine& commandLine = - *base::CommandLine::ForCurrentProcess(); - std::string injectedBundlePath = - commandLine.GetSwitchValueASCII("injected-bundle-path"); - if (injectedBundlePath.empty()) { - return; - } - m_handle_ = dlopen(injectedBundlePath.c_str(), RTLD_LAZY); - if (!m_handle_) { - LOG(ERROR) << "No handle to " << injectedBundlePath.c_str() << " " - << dlerror() << "\n"; - return; - } - - *reinterpret_cast(&m_versionFunction_) = - dlsym(m_handle_, VERSION_FUNCTION); - if (!m_versionFunction_) { - LOG(ERROR) << "No " << VERSION_FUNCTION << " symbol found!\n"; - } else { - m_version_ = m_versionFunction_(); - if (m_version_ != 0 && m_version_ != 1) { - LOG(ERROR) << "Unknown plugin version: " << m_version_ << "!\n"; - return; - } - } - - *reinterpret_cast(&m_startSession_) = - dlsym(m_handle_, START_SESSION_FUNCTION); - if (!m_startSession_) { - LOG(ERROR) << "No " << START_SESSION_FUNCTION << " symbol found!\n"; - } - *reinterpret_cast(&m_stopSession_) = - dlsym(m_handle_, STOP_SESSION_FUNCTION); - if (!m_stopSession_) { - LOG(ERROR) << "No " << STOP_SESSION_FUNCTION << " symbol found!\n"; - } -} - -void DynamicPlugin::startSession(const char* sessionId, - v8::Handle context, - int routingHandle, - const void* sessionBlob) { - if (!m_startSession_) - return; - - m_startSession_(sessionId, context, routingHandle, sessionBlob); -} - -void DynamicPlugin::stopSession(const char* sessionId, - v8::Handle context) { - if (!m_stopSession_) - return; - - m_stopSession_(sessionId, context); -} - -DynamicPlugin::~DynamicPlugin() { - if (m_handle_) - dlclose(m_handle_); -} - -DynamicPlugin& DynamicPlugin::instance() { - static DynamicPlugin dynamicPlugin; - return dynamicPlugin; -} - diff --git a/tizen/wrt/dynamicplugin.h b/tizen/wrt/dynamicplugin.h deleted file mode 100644 index 46a1963..0000000 --- a/tizen/wrt/dynamicplugin.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2014, 2016 Samsung Electronics. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WRT_DYNAMICPLUGIN_H_ -#define WRT_DYNAMICPLUGIN_H_ - -#include -#include "base/macros.h" -#include "v8/include/v8.h" - -typedef unsigned int (*versionFunction)(void); - -typedef void (*startSessionFunction)(const char* sessionId, - v8::Handle context, - int routingHandle, - const void* sessionBlob); - -typedef void (*stopSessionFunction)(const char* sessionId, - v8::Handle context); - -class DynamicPlugin { - public: - void startSession(const char* sessionId, - v8::Handle context, - int routingHandle, - const void* sessionBlob); - void stopSession(const char* sessionId, v8::Handle context); - - virtual ~DynamicPlugin(); - - static DynamicPlugin& instance(); - - protected: - DynamicPlugin(); - DynamicPlugin(const DynamicPlugin&); - DynamicPlugin& operator=(const DynamicPlugin&); - - void* m_handle_; - unsigned int m_version_; - versionFunction m_versionFunction_; - startSessionFunction m_startSession_; - stopSessionFunction m_stopSession_; -}; - -#endif // WRT_DYNAMICPLUGIN_H_ diff --git a/tizen/wrt/v8widget.cc b/tizen/wrt/v8widget.cc deleted file mode 100644 index ef721b8..0000000 --- a/tizen/wrt/v8widget.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2014, 2015 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 "v8widget.h" - -#include "base/logging.h" -#include "dynamicplugin.h" -#if defined(OS_TIZEN_TV_PRODUCT) -#include "wrt/hbbtv_dynamicplugin.h" -#endif -#include "wrt_dynamicplugin.h" - -V8Widget::V8Widget(Type type) : type_(type) {} - -V8Widget::~V8Widget() {} - -void V8Widget::SetId(const std::string& id) { - id_ = id; -} - -V8Widget::Type V8Widget::GetType() const { - return type_; -} - -bool V8Widget::ParseUrl(const GURL& url, - GURL& new_url, - bool& is_decrypted_file) { - if (!id_.empty()) { - std::string old_url = url.possibly_invalid_spec(); - std::string s_new_url; - if (type_ == V8Widget::Type::WRT) - WrtDynamicPlugin::instance().parseURL(&old_url, &s_new_url, id_.c_str(), - &is_decrypted_file); - -#if defined(OS_TIZEN_TV_PRODUCT) - if (type_ == V8Widget::Type::HBBTV) - HbbTVDynamicPlugin::instance().parseURL(&old_url, &s_new_url, id_.c_str(), - &is_decrypted_file); -#endif - - if (!s_new_url.empty()) { - new_url = GURL(s_new_url); - return true; - } - } - return false; -} - -#if defined(OS_TIZEN_TV_PRODUCT) -bool V8Widget::GetFileDecryptedDataBuffer(const GURL& url, - std::vector* data) { - if (!id_.empty()) { - std::string str_url = url.possibly_invalid_spec(); - if (type_ == V8Widget::Type::WRT) - return WrtDynamicPlugin::instance().getFileDecryptedDataBuffer(&str_url, - data); - - if (type_ == V8Widget::Type::HBBTV) - return HbbTVDynamicPlugin::instance().getFileDecryptedDataBuffer(&str_url, - data); - } - return false; -} -#endif - -void V8Widget::StopSession(v8::Handle context) { - if (!id_.empty() && !context.IsEmpty()) { - if (type_ == V8Widget::Type::WRT) - WrtDynamicPlugin::instance().stopSession(id_.c_str(), context); - -#if defined(OS_TIZEN_TV_PRODUCT) - if (type_ == V8Widget::Type::HBBTV) - HbbTVDynamicPlugin::instance().stopSession(id_.c_str(), context); -#endif - } -} - -void V8Widget::StartSession(v8::Handle context, - int routingHandle, - const void* sessionBlob) { - if (!id_.empty() && !context.IsEmpty()) { - if (type_ == V8Widget::Type::WRT) - NOTREACHED(); - -#if defined(OS_TIZEN_TV_PRODUCT) - if (type_ == V8Widget::Type::HBBTV) - HbbTVDynamicPlugin::instance().startSession(id_.c_str(), context, - routingHandle, sessionBlob); -#endif - } -} diff --git a/tizen/wrt/v8widget.h b/tizen/wrt/v8widget.h deleted file mode 100644 index 2b843a3..0000000 --- a/tizen/wrt/v8widget.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2014, 2015 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 WRT_V8WIDGET_H_ -#define WRT_V8WIDGET_H_ - -#include - -#include "content/public/renderer/render_thread_observer.h" -#include "url/gurl.h" -#include "v8/include/v8.h" - -// Have to be created on the RenderThread. -class V8Widget { - public: - enum class Type { HBBTV, WRT }; - - explicit V8Widget(Type type); - virtual ~V8Widget() = 0; - - void SetId(const std::string& id); - Type GetType() const; - - virtual void StartSession(v8::Handle, - int routingHandle, - const void* sessionBlob); - - virtual void StopSession(v8::Handle); - - bool ParseUrl(const GURL& url, GURL& new_url, bool& is_decrypted_file); - -#if defined(OS_TIZEN_TV_PRODUCT) - bool GetFileDecryptedDataBuffer(const GURL& url, std::vector* data); -#endif - protected: - std::string id_; - Type type_; -}; - -#endif // WRT_V8WIDGET_H_ diff --git a/tizen/wrt/wrt_dynamicplugin.cc b/tizen/wrt/wrt_dynamicplugin.cc deleted file mode 100644 index 68cf087..0000000 --- a/tizen/wrt/wrt_dynamicplugin.cc +++ /dev/null @@ -1,164 +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 "wrt_dynamicplugin.h" - -#include - -#include "base/command_line.h" -#include "base/logging.h" - -namespace { -const char* const URL_PARSING_FUNCTION = "DynamicUrlParsing"; -const char* const SET_WIDGET_INFO_FUNCTION = "DynamicSetWidgetInfo"; -const char* const DATABASE_ATTACH_FUNCTION = "DynamicDatabaseAttach"; -#if defined(OS_TIZEN_TV_PRODUCT) -const char* const TVURL_PARSING_FUNCTION = "DynamicTVUrlParsing"; -const char* const GET_FILEDECRYPTED_DATABUFFER = - "DynamicGetFileDecryptedDataBuffer"; -#endif - -typedef void (*startSessionFun_v0)(const char* tizen_app_id, - v8::Handle context, - int routingHandle, - double scaleFactor, - const char* encodedBundle, - const char* theme, - const char* baseURL); -} // namespace - -WrtDynamicPlugin::WrtDynamicPlugin() - : DynamicPlugin(), - m_parseURL_(0), - m_setWidgetInfo_(0), - m_databaseAttach_(0), -#if defined(OS_TIZEN_TV_PRODUCT) - m_getFileDecryptedDataBuffer_(0), - m_parseTVURL_(0), -#endif - m_onIPCMessage_(0) { - *reinterpret_cast(&m_parseURL_) = - dlsym(m_handle_, URL_PARSING_FUNCTION); - if (!m_parseURL_) { - LOG(ERROR) << "No " << URL_PARSING_FUNCTION << " symbol found!\n"; - } - *reinterpret_cast(&m_setWidgetInfo_) = - dlsym(m_handle_, SET_WIDGET_INFO_FUNCTION); - if (!m_setWidgetInfo_) { - LOG(ERROR) << "No " << SET_WIDGET_INFO_FUNCTION << " symbol found!"; - } - *reinterpret_cast(&m_databaseAttach_) = - dlsym(m_handle_, DATABASE_ATTACH_FUNCTION); - if (!m_databaseAttach_) { - LOG(ERROR) << "No " << DATABASE_ATTACH_FUNCTION << " symbol found!\n"; - return; - } - *reinterpret_cast(&m_onIPCMessage_) = - dlsym(m_handle_, "DynamicOnIPCMessage"); - if (!m_onIPCMessage_) { - LOG(ERROR) << "No DynamicOnIPCMessage symbol found!\n"; - } - m_databaseAttach_(1); - -#if defined(OS_TIZEN_TV_PRODUCT) - *reinterpret_cast(&m_parseTVURL_) = - dlsym(m_handle_, TVURL_PARSING_FUNCTION); - if (!m_parseTVURL_) { - LOG(ERROR) << "No " << TVURL_PARSING_FUNCTION << " symbol found!\n"; - } - *reinterpret_cast(&m_getFileDecryptedDataBuffer_) = - dlsym(m_handle_, GET_FILEDECRYPTED_DATABUFFER); - if (!m_getFileDecryptedDataBuffer_) { - LOG(ERROR) << "No " << GET_FILEDECRYPTED_DATABUFFER << " symbol found!\n"; - } -#endif -} - -void WrtDynamicPlugin::startSession(const char* tizen_app_id, - v8::Handle context, - int routingHandle, - double scaleFactor, - const char* encodedBundle, - const char* theme, - const char* baseURL) { - if (!m_startSession_ || !m_databaseAttach_) - return; - switch (m_version_) { - case 0: { - auto startSession_v0 = - reinterpret_cast(m_startSession_); - startSession_v0(tizen_app_id, context, routingHandle, scaleFactor, - encodedBundle, theme, baseURL); - break; - } - case 1: { - DynamicPlugin::startSession(tizen_app_id, context, routingHandle, - baseURL); - break; - } - default: - return; - } -} - -void WrtDynamicPlugin::stopSession(const char* tizen_app_id, - v8::Handle context) { - if (!m_stopSession_ || !m_databaseAttach_) - return; - DynamicPlugin::stopSession(tizen_app_id, context); -} - -void WrtDynamicPlugin::parseURL(std::string* old_url, - std::string* new_url, - const char* tizen_app_id, - bool* is_decrypted_file) { -#if defined(OS_TIZEN_TV_PRODUCT) - if (!m_databaseAttach_) - return; - if (m_parseTVURL_) { - m_parseTVURL_(old_url, new_url, tizen_app_id, is_decrypted_file); - return; - } - if (m_parseURL_) { - m_parseURL_(old_url, new_url, tizen_app_id); - *is_decrypted_file = false; - } -#else - if (!m_parseURL_ || !m_databaseAttach_) - return; - m_parseURL_(old_url, new_url, tizen_app_id); -#endif -} - -#if defined(OS_TIZEN_TV_PRODUCT) -bool WrtDynamicPlugin::getFileDecryptedDataBuffer(const std::string* url, - std::vector* data) { - if (!m_getFileDecryptedDataBuffer_) - return false; - return m_getFileDecryptedDataBuffer_(url, data); -} -#endif - -void WrtDynamicPlugin::setWidgetInfo(const std::string& tizen_app_id) { - if (!m_setWidgetInfo_) - return; - m_setWidgetInfo_(tizen_app_id.c_str()); -} - -WrtDynamicPlugin::~WrtDynamicPlugin() { - if (m_databaseAttach_) - m_databaseAttach_(0); -} - -WrtDynamicPlugin& WrtDynamicPlugin::instance() { - static WrtDynamicPlugin dynamicPlugin; - return dynamicPlugin; -} - -void WrtDynamicPlugin::messageReceived(const Wrt_Message_Data& data) { - if (!m_onIPCMessage_) - return; - - m_onIPCMessage_(data); -} diff --git a/tizen/wrt/wrt_dynamicplugin.h b/tizen/wrt/wrt_dynamicplugin.h deleted file mode 100644 index 9554b4d..0000000 --- a/tizen/wrt/wrt_dynamicplugin.h +++ /dev/null @@ -1,71 +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. - -#ifndef WRT_WRT_DYNAMICPLUGIN_H_ -#define WRT_WRT_DYNAMICPLUGIN_H_ - -#include -#include -#include "dynamicplugin.h" -#include "v8/include/v8.h" -#include "common/wrt_message_data.h" - -typedef void (*onIPCMessageFun)(const Wrt_Message_Data& data); -#if defined(OS_TIZEN_TV_PRODUCT) -typedef void (*TVParseUrlFun)(std::string* old_url, - std::string* new_url, - const char* tizen_app_id, - bool* is_decrypted_file); -typedef bool (*getFileDecryptedDataBufferFun)(const std::string* url, - std::vector* data); -#endif -typedef void (*parseUrlFun)(std::string* old_url, - std::string* new_url, - const char* tizen_app_id); -typedef void (*setWidgetInfoFun)(const char* tizen_app_id); -typedef void (*databaseAttachFun)(int databaseAttach); - -class WrtDynamicPlugin : public DynamicPlugin { - public: - void startSession(const char* tizen_app_id, - v8::Handle context, - int routingHandle, - double scaleFactor, - const char* encodedBundle, - const char* theme, - const char* baseURL); - void stopSession(const char* tizen_app_id, v8::Handle context); - - void parseURL(std::string* old_url, - std::string* new_url, - const char* tizen_app_id, - bool* is_decrypted_file); - -#if defined(OS_TIZEN_TV_PRODUCT) - bool getFileDecryptedDataBuffer(const std::string* url, - std::vector* data); -#endif - - void setWidgetInfo(const std::string& tizen_app_id); - void messageReceived(const Wrt_Message_Data& data); - - static WrtDynamicPlugin& instance(); - ~WrtDynamicPlugin() override; - - private: - WrtDynamicPlugin(); - - parseUrlFun m_parseURL_; - setWidgetInfoFun m_setWidgetInfo_; - databaseAttachFun m_databaseAttach_; -#if defined(OS_TIZEN_TV_PRODUCT) - getFileDecryptedDataBufferFun m_getFileDecryptedDataBuffer_; - TVParseUrlFun m_parseTVURL_; -#endif - onIPCMessageFun m_onIPCMessage_; - - DISALLOW_COPY_AND_ASSIGN(WrtDynamicPlugin); -}; - -#endif // WRT_WRT_DYNAMICPLUGIN_H_ diff --git a/tizen/wrt/wrt_file_protocol_handler.cc b/tizen/wrt/wrt_file_protocol_handler.cc deleted file mode 100644 index 5a8ba30..0000000 --- a/tizen/wrt/wrt_file_protocol_handler.cc +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2014,2015 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 "wrt_file_protocol_handler.h" - -#include "base/command_line.h" -//#include "common/content_switches_efl.h" -#include "content/public/common/content_client.h" -#include "content/public/renderer/content_renderer_client.h" -#include "net/base/filename_util.h" -#include "net/url_request/url_request_data_job.h" -#include "net/url_request/url_request_error_job.h" -#include "net/url_request/url_request_file_dir_job.h" -#include "net/url_request/url_request_file_job.h" -#include "net/url_request/url_request_simple_job.h" -#include "wrt_dynamicplugin.h" - -namespace net { - -class WrtURLRequestDataJob : public URLRequestSimpleJob { - public: - /* LCOV_EXCL_START */ - WrtURLRequestDataJob(URLRequest* request, - NetworkDelegate* network_delegate, - const GURL& data_url) - : URLRequestSimpleJob(request, network_delegate) { - data_url_ = data_url; - } - /* LCOV_EXCL_STOP */ - - int GetData(std::string* mime_type, - std::string* charset, - std::string* data, - const CompletionCallback& callback) const override; - - private: - ~WrtURLRequestDataJob() override {} // LCOV_EXCL_LINE - GURL data_url_; -}; - -/* LCOV_EXCL_START */ -int WrtURLRequestDataJob::GetData(std::string* mime_type, - std::string* charset, - std::string* data, - const CompletionCallback& callback) const { - if (!data_url_.is_valid()) - return ERR_INVALID_URL; - - return URLRequestDataJob::BuildResponse(data_url_, mime_type, charset, data, - nullptr); -} - -bool WrtFileProtocolHandler::GetWrtParsedUrl(const GURL& url, - GURL& parsed_url) const { - static std::string tizen_app_id = - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - "widget-id"); - if (!tizen_app_id.empty()) { - bool is_decrypted_file; - std::string url_str = url.possibly_invalid_spec(); - std::string parsed_url_str; - WrtDynamicPlugin::instance().parseURL( - &url_str, &parsed_url_str, tizen_app_id.c_str(), &is_decrypted_file); - if (!parsed_url_str.empty()) { - parsed_url = GURL(parsed_url_str); - return true; - } - } - return false; -} -/* LCOV_EXCL_STOP */ - -URLRequestJob* WrtFileProtocolHandler::MaybeCreateJob( - URLRequest* request, - NetworkDelegate* network_delegate) const { - GURL parsed_url; - if (GetWrtParsedUrl(request->url(), parsed_url)) { - // Data URI scheme for WRT encryption content - if (parsed_url.SchemeIs(url::kDataScheme)) - return new WrtURLRequestDataJob(request, network_delegate, parsed_url); - } else - parsed_url = request->url(); - - base::FilePath file_path; - const bool is_file = FileURLToFilePath(parsed_url, &file_path); - - // Check file access permissions. - if (!network_delegate || - !network_delegate->CanAccessFile(*request, file_path)) { - return new URLRequestErrorJob(request, network_delegate, ERR_ACCESS_DENIED); - } - - // We need to decide whether to create URLRequestFileJob for file access or - // URLRequestFileDirJob for directory access. To avoid accessing the - // filesystem, we only look at the path string here. - // The code in the URLRequestFileJob::Start() method discovers that a path, - // which doesn't end with a slash, should really be treated as a directory, - // and it then redirects to the URLRequestFileDirJob. - if (is_file && file_path.EndsWithSeparator() && file_path.IsAbsolute()) { - return new URLRequestFileDirJob(request, network_delegate, file_path); - } - - // Use a regular file request job for all non-directories (including invalid - // file names). - return new URLRequestFileJob(request, network_delegate, file_path, - file_task_runner_); -} - -} // namespace diff --git a/tizen/wrt/wrt_file_protocol_handler.h b/tizen/wrt/wrt_file_protocol_handler.h deleted file mode 100644 index 6fab49f..0000000 --- a/tizen/wrt/wrt_file_protocol_handler.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2014,2015 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 WRT_FILE_PROTOCOL_HANDLER -#define WRT_FILE_PROTOCOL_HANDLER - -#include "base/memory/ref_counted.h" -#include "net/url_request/url_request_job_factory.h" - -class GURL; - -namespace base { -class TaskRunner; -} - -namespace net { - -class NetworkDelegate; -class URLRequestJob; - -class WrtFileProtocolHandler - : public URLRequestJobFactory::ProtocolHandler { - public: - explicit WrtFileProtocolHandler( - const scoped_refptr& file_task_runner) - : file_task_runner_(file_task_runner) {} - ~WrtFileProtocolHandler() override {} - URLRequestJob* MaybeCreateJob( - URLRequest* request, - NetworkDelegate* network_delegate) const override; - /* LCOV_EXCL_START */ - bool IsSafeRedirectTarget(const GURL& location) const override { - return false; - } - /* LCOV_EXCL_STOP */ - - private: - bool GetWrtParsedUrl(const GURL& url, GURL& parsed_url) const; - const scoped_refptr file_task_runner_; - DISALLOW_COPY_AND_ASSIGN(WrtFileProtocolHandler); -}; - -} // namespace net - -#endif // WRT_FILE_PROTOCOL_HANDLER diff --git a/tizen/wrt/wrt_widget_host.cc b/tizen/wrt/wrt_widget_host.cc deleted file mode 100644 index d33c513..0000000 --- a/tizen/wrt/wrt_widget_host.cc +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2014,2015 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 "wrt_widget_host.h" - -#include "base/lazy_instance.h" -//#include "common/render_messages_ewk.h" -#include "atom/common/api/api_messages.h" -#include "content/public/browser/browser_message_filter.h" -#include "content/public/browser/render_process_host.h" -#include "content/public/browser/resource_request_info.h" -//#include "ipc/ipc_message_macros.h" -//#include "ipc_message_start_ewk.h" -#include "net/url_request/url_request.h" -#include "url/gurl.h" - -namespace { -// TODO(z.kostrzewa) I would prefer not make it a singleton, check out -// if it can't be a member of ContentMainDelegateEfl (but keep the static -// getter, maybe?). -base::LazyInstance > g_wrt_widget_host = - LAZY_INSTANCE_INITIALIZER; - -bool SendToAllRenderers(IPC::Message* message) { - bool result = false; - content::RenderProcessHost::iterator it = - content::RenderProcessHost::AllHostsIterator(); - while (!it.IsAtEnd()) { - if (it.GetCurrentValue()->Send(new IPC::Message(*message))) - result = true; - it.Advance(); - } - delete message; - return result; -} - -bool SendToRenderer(int renderer_id, IPC::Message* message) { - return content::RenderProcessHost::FromID(renderer_id)->Send(message); -} -} - -class WrtWidgetHostMessageFilter : public content::BrowserMessageFilter { - public: - explicit WrtWidgetHostMessageFilter(WrtWidgetHost* wrt_widget_host); - - private: - ~WrtWidgetHostMessageFilter() override {} - bool OnMessageReceived(const IPC::Message& message) override; - - WrtWidgetHost* wrt_widget_host_; -}; - -WrtWidgetHostMessageFilter::WrtWidgetHostMessageFilter( - WrtWidgetHost* wrt_widget_host) - : content::BrowserMessageFilter(ShellMsgStart), - wrt_widget_host_(wrt_widget_host) { -} - -bool WrtWidgetHostMessageFilter::OnMessageReceived(const IPC::Message& message) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(WrtWidgetHostMessageFilter, message) - IPC_MESSAGE_FORWARD(WrtMsg_ParseUrlResponse, wrt_widget_host_, WrtWidgetHost::OnUrlRetrieved) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - -WrtWidgetHost* WrtWidgetHost::Get() { - // TODO(z.kostrzewa) LazyInstance is thread-safe but creating - // WrtWidgetHost is not - make it thread-safe. - if (!g_wrt_widget_host.Get().get()) - g_wrt_widget_host.Get().reset(new WrtWidgetHost); - return g_wrt_widget_host.Get().get(); -} - -WrtWidgetHost::WrtWidgetHost() - : message_filter_(new WrtWidgetHostMessageFilter(this)) { -} - -WrtWidgetHost::~WrtWidgetHost() {} - -void WrtWidgetHost::GetUrlForRequest( - net::URLRequest* request, - base::Callback callback) { - // TODO(z.kostrzewa) Check on which thread(s) callbacks_ is touched - // and provide synchronization if required (either via a lock or - // by assuring that it is referenced only on one thread) - int callback_id = callback_id_generator_.GetNext(); - callbacks_[callback_id] = callback; - - int renderer_id, frame_id; - if (content::ResourceRequestInfo::GetRenderFrameForRequest(request, &renderer_id, - &frame_id)) - if (SendToRenderer(renderer_id, new WrtMsg_ParseUrl(callback_id, request->url()))) - return; - - callbacks_.erase(callback_id); - callback.Run(GURL()); -} - -void WrtWidgetHost::SendWrtMessage( - const Wrt_Message_Data& message) { - SendToAllRenderers(new WrtMsg_SendWrtMessage(message)); -} - -// It's only used by the wrt_file_protocol_handler which is not going to be used in the future -// Candidate for deletion. -bool WrtWidgetHost::InWrt() const { - return false; -} - -// It's only used by the wrt_file_protocol_handler which is not going to be used in the future -// Candidate for deletion. -std::string WrtWidgetHost::TizenAppId() const { -#if defined(OS_TIZEN_TV_PRODUCT) - return tizen_app_id_; -#else - return std::string(); -#endif -} - -void WrtWidgetHost::OnUrlRetrieved(int callback_id, const GURL& url) { - callbacks_type::iterator it = callbacks_.find(callback_id); - if (callbacks_.end() == it) - return; - - callbacks_type::mapped_type callback = it->second; - callbacks_.erase(callback_id); - callback.Run(url); -} - -#if defined(OS_TIZEN_TV_PRODUCT) -void WrtWidgetHost::SetTizenAppId(const std::string& tizen_app_id) { - tizen_app_id_ = tizen_app_id; -} - -bool WrtWidgetHost::ShouldAllowRequest(const net::URLRequest& request) { - if (tizen_app_id_.empty() || !check_accessiable_path_callback_) - return true; - - return check_accessiable_path_callback_->TriggerCallback(request.url().spec(), - tizen_app_id_); -} - -bool EwkCheckAccessiablePathCallback::TriggerCallback( - const std::string& url_spec, - const std::string& tizen_app_id) const { - if (!callback_) - return true; - - Eina_Bool result = - (*callback_)(tizen_app_id.c_str(), url_spec.c_str(), user_data_); - return result == EINA_TRUE; -} - -void WrtWidgetHost::SetCheckAccessiablePathCallback( - Ewk_Context_Check_Accessible_Path_Callback callback, - void* user_data) { - check_accessiable_path_callback_.reset( - new EwkCheckAccessiablePathCallback(callback, user_data)); -} -#endif - diff --git a/tizen/wrt/wrt_widget_host.h b/tizen/wrt/wrt_widget_host.h deleted file mode 100644 index 11161da..0000000 --- a/tizen/wrt/wrt_widget_host.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2014,2015 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 WRT_HOST_H -#define WRT_HOST_H - -#include -#include - -#include "base/atomic_sequence_num.h" -#include "base/callback.h" -#include "content/public/browser/browser_message_filter.h" -#include "common/wrt_message_data.h" -#if defined(OS_TIZEN_TV_PRODUCT) -#include "public/ewk_context_product.h" -#endif - -namespace net { -class URLRequest; -} - -class GURL; - -class WrtWidgetHostMessageFilter; - -#if defined(OS_TIZEN_TV_PRODUCT) -class EwkCheckAccessiablePathCallback { - public: - EwkCheckAccessiablePathCallback( - Ewk_Context_Check_Accessible_Path_Callback callback, - void* user_data) - : callback_(callback), user_data_(user_data) {} - bool TriggerCallback(const std::string& url_spec, - const std::string& tizen_app_id) const; - - private: - Ewk_Context_Check_Accessible_Path_Callback callback_; - void* user_data_; -}; -#endif - -class WrtWidgetHost { - public: - static WrtWidgetHost* Get(); - - ~WrtWidgetHost(); - - void GetUrlForRequest(net::URLRequest* request, - base::Callback callback); - - void SendWrtMessage(const Wrt_Message_Data& message); - - bool InWrt() const; - - std::string TizenAppId() const; - -#if defined(OS_TIZEN_TV_PRODUCT) - void SetTizenAppId(const std::string& tizen_app_id); - bool ShouldAllowRequest(const net::URLRequest& request); - - void SetCheckAccessiablePathCallback( - Ewk_Context_Check_Accessible_Path_Callback callback, - void* user_data); -#endif - - private: - friend class WrtWidgetHostMessageFilter; - - typedef std::map > callbacks_type; - - WrtWidgetHost(); - - void OnUrlRetrieved(int callback_id, const GURL& url); - - scoped_refptr message_filter_; - base::AtomicSequenceNumber callback_id_generator_; - callbacks_type callbacks_; - -#if defined(OS_TIZEN_TV_PRODUCT) - std::string tizen_app_id_; - std::unique_ptr check_accessiable_path_callback_; -#endif - - DISALLOW_COPY_AND_ASSIGN(WrtWidgetHost); -}; - - -#endif diff --git a/tizen/wrt/wrtwidget.cc b/tizen/wrt/wrtwidget.cc deleted file mode 100644 index 6c877c6..0000000 --- a/tizen/wrt/wrtwidget.cc +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2014, 2015 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 "wrtwidget.h" - -//#include "common/render_messages_ewk.h" -#include "atom/common/api/api_messages.h" -#include "content/public/renderer/render_thread.h" -#include "ipc/ipc_sync_channel.h" -#include "wrt_dynamicplugin.h" - -// TODO(z.kostrzewa) -// Why it can't be implemented as IPC::ChannelProxy::MessageFilter (?) -// Tried that and it seems that Observer starts receiving messages earlier than -// MessageFilter what is crucial for message that sets widget handle -class WrtRenderThreadObserver : public content::RenderThreadObserver { - public: - explicit WrtRenderThreadObserver(WrtWidget* wrt_widget) - : wrt_widget_(wrt_widget), - channel_(content::RenderThread::Get()->GetChannel()) - { } - - bool OnControlMessageReceived(const IPC::Message& message) override { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(WrtRenderThreadObserver, message) - IPC_MESSAGE_FORWARD(WrtMsg_SendWrtMessage, wrt_widget_, WrtWidget::MessageReceived) - IPC_MESSAGE_HANDLER(WrtMsg_ParseUrl, ParseUrl) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; - } - - private: - void ParseUrl(int request_id, const GURL& url) { - GURL response; - bool is_decrypted_file = false; - wrt_widget_->ParseUrl(url, response, is_decrypted_file); - Send(new WrtMsg_ParseUrlResponse(request_id, response)); - } - - void Send(IPC::Message* message) { - if (channel_) - channel_->Send(message); - else - delete message; - } - - WrtWidget* wrt_widget_; - IPC::SyncChannel* channel_; -}; - -WrtWidget::WrtWidget() - : V8Widget(V8Widget::Type::WRT), - scale_(0), - observer_(new WrtRenderThreadObserver(this)) { - DCHECK(content::RenderThread::Get()) - << "WrtWidget must be constructed on the render thread"; -} - -WrtWidget::~WrtWidget() { - delete observer_; -} - -content::RenderThreadObserver* WrtWidget::GetObserver() { - return observer_; -} - -void WrtWidget::SetWidgetInfo(const std::string& tizen_app_id, - double scaleFactor, - const std::string& theme, - const std::string& encodedBundle) { - id_ = tizen_app_id; - scale_ = scaleFactor; - theme_ = theme; - encodedBundle_ = encodedBundle; - WrtDynamicPlugin::instance().setWidgetInfo(id_); -} - -bool WrtWidget::IsWidgetInfoSet() const { - return !id_.empty(); -} - -void WrtWidget::StartSession(v8::Handle context, - int routingHandle, - const void* sessionBlob) { - if (!id_.empty() && !context.IsEmpty()) { - WrtDynamicPlugin::instance().startSession( - id_.c_str(), context, routingHandle, scale_, encodedBundle_.c_str(), - theme_.c_str(), reinterpret_cast(sessionBlob)); - } -} - -void WrtWidget::MessageReceived(const Wrt_Message_Data& data) { - if (!id_.empty()) - WrtDynamicPlugin::instance().messageReceived(data); -} diff --git a/tizen/wrt/wrtwidget.h b/tizen/wrt/wrtwidget.h deleted file mode 100644 index 28af8cb..0000000 --- a/tizen/wrt/wrtwidget.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2014, 2015 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 WRT_WRTWIDGET_H_ -#define WRT_WRTWIDGET_H_ - -#include - -#include "content/public/renderer/render_thread_observer.h" -#include "url/gurl.h" -#include "v8widget.h" -#include "common/wrt_message_data.h" - -class WrtRenderThreadObserver; - -// Have to be created on the RenderThread. -class WrtWidget : public V8Widget { - public: - WrtWidget(); - ~WrtWidget() override; - - content::RenderThreadObserver* GetObserver(); - - void SetWidgetInfo(const std::string& tizen_app_id, - double scaleFactor, - const std::string& theme, - const std::string& encodedBundle); - - bool IsWidgetInfoSet() const; - - void MessageReceived(const Wrt_Message_Data& data); - - void StartSession(v8::Handle, - int routingHandle, - const void* sessionBlob) override; - - private: - double scale_; - std::string encodedBundle_; - std::string theme_; - WrtRenderThreadObserver* observer_; -}; - -#endif // WRT_WRTWIDGET_H_ diff --git a/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/private/ewk_wrt_private.h b/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/private/ewk_wrt_private.h index c0d5208..2f60494 100644 --- a/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/private/ewk_wrt_private.h +++ b/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/private/ewk_wrt_private.h @@ -7,7 +7,7 @@ #include -struct Ewk_Wrt_Message_Data { +struct __attribute__((visibility("default"))) Ewk_Wrt_Message_Data { std::string type; std::string value; std::string id; diff --git a/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h b/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h index ad087e9..01f01c7 100644 --- a/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h +++ b/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h @@ -41,7 +41,7 @@ class EwkCheckAccessiablePathCallback { }; #endif -class WrtWidgetHost { +class __attribute__((visibility("default"))) WrtWidgetHost { public: static WrtWidgetHost* Get(); diff --git a/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrtwidget.h b/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrtwidget.h index 45c2c93..4e504e0 100644 --- a/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrtwidget.h +++ b/vendor/brightray/vendor/libchromiumcontent/src/tizen_src/ewk/efl_integration/wrt/wrtwidget.h @@ -16,7 +16,7 @@ struct Ewk_Wrt_Message_Data; class WrtRenderThreadObserver; // Have to be created on the RenderThread. -class WrtWidget : public V8Widget { +class __attribute__((visibility("default"))) WrtWidget : public V8Widget { public: WrtWidget(); ~WrtWidget() override; diff --git a/wrt.gyp b/wrt.gyp index d8528b0..663ee2c 100644 --- a/wrt.gyp +++ b/wrt.gyp @@ -15,7 +15,6 @@ '<(DEPTH)/tizen/loader/loader.gyp:wrt-loader', '<(DEPTH)/tizen/extensions/extensions.gyp:xwalk_extension_shared', '<(DEPTH)/tizen/renderer/injected_bundle.gyp:xwalk_injected_bundle', - '<(DEPTH)/tizen/wrt/chromium_wrt.gyp:chromium_wrt_shared', '<(DEPTH)/efl/build/system.gyp:ecore', '<(DEPTH)/efl/build/system.gyp:launchpad', '<(DEPTH)/efl/build/system.gyp:capi-appfw-application', @@ -130,6 +129,7 @@ '<(libchromiumcontent_src_dir)/components/cdm', '<(libchromiumcontent_src_dir)/third_party/widevine', '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl', + '<(libchromiumcontent_src_dir)/tizen_src/ewk/efl_integration', ], 'direct_dependent_settings': { 'include_dirs': [ -- 2.7.4