From acb7037bb16c209666b4b7ef6e8352924e7e80ef Mon Sep 17 00:00:00 2001 From: "yh106.jung" Date: Tue, 6 Dec 2016 08:14:11 +0900 Subject: [PATCH] [M67 Dev][WRT][EWK] Deprecate ewk_send_widget_info and add ewk_context_tizen_app_id_set Original patch: http://165.213.202.130/gerrit/#/c/98860/ Original author: Marcin Niesluchowski ewk_context_tizen_app_id_set() does the same as ewk_send_widget_info() but with removal of unnecessary parameters, which are not used in plugins. Also name has been changed due its inconsistency with implementation and usage. ewk_send_widget_info() was marked as deprecated. Fix utc_blink_ewk_context_new_with_injected_bundle_path_func.POS_TEST1 failing due to ewk_send_widget_info() api called after loading url. Now ewk_context_tizen_app_id_set() is called before loading url instead. To complete api change following steps should be taken: 1) After this commit is merged all plugin libraries should add [1] and [2] api and remove [3]. [1] api should return current plugin verison - 1. [2] should act the same as [3] api. ewk_context_tizen_app_id_set should be used instead of ewk_send_widget_info. 2) After that ewk_send_widget_info deprecated api should be removed in different commit. For proper usage see following test file: ewk/unittest/resources/ewk_context/injected_bundle/chromium/bundle_sample.cc [1] unsigned int DynamicPluginVersion(); [2] void DynamicPluginStartSession(const char* tizen_app_id, v8::Handle context, int routing_handle, const char* base_url); [3] void DynamicPluginStartSession(const char* tizen_id, v8::Handle context, int routing_handle, double scale, const char* encoded_bundle, const char* theme, const char* base_url); Reference: https://review.tizen.org/gerrit/#/c/173311/ Change-Id: I6acd741bd41dd4c68d1ca8e7e6022ce7a01e5cba Signed-off-by: yh106.jung Signed-off-by: Youngsoo Choi --- .../efl_integration/common/content_switches_efl.cc | 2 +- .../efl_integration/common/content_switches_efl.h | 2 +- .../efl_integration/content_browser_client_efl.cc | 5 +- tizen_src/ewk/efl_integration/eweb_context.cc | 10 ++-- tizen_src/ewk/efl_integration/eweb_context.h | 6 +-- .../efl_integration/private/ewk_context_private.cc | 8 +-- .../efl_integration/private/ewk_context_private.h | 6 ++- .../ewk/efl_integration/public/ewk_context.cc | 12 ++++- .../renderer/content_renderer_client_efl.cc | 8 +-- tizen_src/ewk/efl_integration/wrt/dynamicplugin.cc | 58 ++++++++++++++++++---- tizen_src/ewk/efl_integration/wrt/dynamicplugin.h | 24 ++++----- .../wrt/wrt_file_protocol_handler.cc | 4 +- .../ewk/efl_integration/wrt/wrt_widget_host.cc | 2 +- .../ewk/efl_integration/wrt/wrt_widget_host.h | 2 +- tizen_src/ewk/efl_integration/wrt/wrtwidget.cc | 22 ++++---- tizen_src/ewk/efl_integration/wrt/wrtwidget.h | 4 +- .../injected_bundle/chromium/bundle_sample.cc | 9 ++-- ...k_context_new_with_injected_bundle_path_func.cc | 2 +- 18 files changed, 116 insertions(+), 70 deletions(-) diff --git a/tizen_src/ewk/efl_integration/common/content_switches_efl.cc b/tizen_src/ewk/efl_integration/common/content_switches_efl.cc index 9e07a3c..d3dd7c1 100644 --- a/tizen_src/ewk/efl_integration/common/content_switches_efl.cc +++ b/tizen_src/ewk/efl_integration/common/content_switches_efl.cc @@ -14,7 +14,7 @@ const char kEnableViewMode[] = "enable-view-mode"; const char kInjectedBundlePath[] = "injected-bundle-path"; // Widget Info -const char kTizenId[] = "widget-id"; +const char kTizenAppId[] = "widget-id"; const char kWidgetScale[] = "widget-scale"; const char kWidgetTheme[] = "widget-theme"; const char kWidgetEncodedBundle[] = "widget-encoded-bundle"; diff --git a/tizen_src/ewk/efl_integration/common/content_switches_efl.h b/tizen_src/ewk/efl_integration/common/content_switches_efl.h index 904966b..183e026 100644 --- a/tizen_src/ewk/efl_integration/common/content_switches_efl.h +++ b/tizen_src/ewk/efl_integration/common/content_switches_efl.h @@ -18,7 +18,7 @@ namespace switches { // different modes using CSS Media Queries. CONTENT_EXPORT extern const char kEnableViewMode[]; CONTENT_EXPORT extern const char kInjectedBundlePath[]; -CONTENT_EXPORT extern const char kTizenId[]; +CONTENT_EXPORT extern const char kTizenAppId[]; CONTENT_EXPORT extern const char kWidgetScale[]; CONTENT_EXPORT extern const char kWidgetTheme[]; CONTENT_EXPORT extern const char kWidgetEncodedBundle[]; diff --git a/tizen_src/ewk/efl_integration/content_browser_client_efl.cc b/tizen_src/ewk/efl_integration/content_browser_client_efl.cc index 357974c..9359d52 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.cc +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.cc @@ -82,8 +82,9 @@ void ContentBrowserClientEfl::AppendExtraCommandLineSwitches( command_line->AppendSwitchASCII(switches::kInjectedBundlePath, injectedBundlePath); - const std::string& tizen_id = context->GetTizenId(); - command_line->AppendSwitchASCII(switches::kTizenId, tizen_id); + const std::string& tizen_app_id = context->GetTizenAppId(); + command_line->AppendSwitchASCII( + switches::kTizenAppId, tizen_app_id); double scale = context->GetWidgetScale(); command_line->AppendSwitchASCII(switches::kWidgetScale, diff --git a/tizen_src/ewk/efl_integration/eweb_context.cc b/tizen_src/ewk/efl_integration/eweb_context.cc index 2a88e74..1ab3e93d 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.cc +++ b/tizen_src/ewk/efl_integration/eweb_context.cc @@ -206,11 +206,11 @@ bool EwkMimeOverrideCallback::TriggerCallback(const std::string& url_spec, return result; } -void EWebContext::SendWidgetInfo(const std::string& tizen_id, - double scale, - const string& theme, - const string& encoded_bundle) { - tizen_id_ = tizen_id; +void EWebContext::SetWidgetInfo(const std::string& tizen_app_id, + double scale, + const string& theme, + const string& encoded_bundle) { + tizen_app_id_ = tizen_app_id; widget_scale_ = scale; widget_theme_ = theme; widget_encoded_bundle_ = encoded_bundle; diff --git a/tizen_src/ewk/efl_integration/eweb_context.h b/tizen_src/ewk/efl_integration/eweb_context.h index b95da5e..d56befb 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.h +++ b/tizen_src/ewk/efl_integration/eweb_context.h @@ -134,7 +134,7 @@ class EWebContext { bool SetFaviconDatabasePath(const base::FilePath& path); Evas_Object *AddFaviconObject(const char *uri, Evas *canvas) const; - void SendWidgetInfo(const std::string& tizen_id, double scale, const std::string &theme, const std::string &encoded_bundle); + void SetWidgetInfo(const std::string& tizen_app_id, double scale, const std::string &theme, const std::string &encoded_bundle); void SendWrtMessage(const Ewk_Wrt_Message_Data& message); void SetMimeOverrideCallback(Ewk_Context_Override_Mime_For_Url_Callback callback, @@ -164,7 +164,7 @@ class EWebContext { bool NotificationCancelCallback(uint64_t notification_id); const std::string& GetInjectedBundlePath() const { return injected_bundle_path_; } - const std::string& GetTizenId() const { return tizen_id_; } + const std::string& GetTizenAppId() const { return tizen_app_id_; } const std::string& GetWidgetTheme() const { return widget_theme_; } const std::string& GetWidgetEncodedBundle() const { return widget_encoded_bundle_; } double GetWidgetScale() const { return widget_scale_; } @@ -187,7 +187,7 @@ class EWebContext { std::string proxy_uri_; std::string injected_bundle_path_; // widget info - std::string tizen_id_; + std::string tizen_app_id_; std::string widget_theme_; std::string widget_encoded_bundle_; double widget_scale_; diff --git a/tizen_src/ewk/efl_integration/private/ewk_context_private.cc b/tizen_src/ewk/efl_integration/private/ewk_context_private.cc index d8fdd1e..60f115a 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_context_private.cc +++ b/tizen_src/ewk/efl_integration/private/ewk_context_private.cc @@ -208,9 +208,11 @@ Evas_Object * Ewk_Context::AddFaviconObject(const char *uri, Evas *canvas) const return impl->AddFaviconObject(uri, canvas); } -void Ewk_Context::SendWidgetInfo(const std::string& tizen_id, double scale, const std::string &theme, - const std::string &encoded_bundle) { - impl->SendWidgetInfo(tizen_id, scale, theme, encoded_bundle); +void Ewk_Context::SetWidgetInfo(const std::string& tizen_app_id, + double scale, + const std::string& theme, + const std::string& encoded_bundle) { + impl->SetWidgetInfo(tizen_app_id, scale, theme, encoded_bundle); } int Ewk_Context::Pixmap() const { diff --git a/tizen_src/ewk/efl_integration/private/ewk_context_private.h b/tizen_src/ewk/efl_integration/private/ewk_context_private.h index 3fa83cd..53befd0 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_context_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_context_private.h @@ -100,8 +100,10 @@ struct Ewk_Context : public base::RefCounted { Evas_Object *AddFaviconObject(const char *uri, Evas *canvas) const; // Widget - void SendWidgetInfo(const std::string& tizen_id, double scale, const std::string &theme, - const std::string &encoded_bundle); + void SetWidgetInfo(const std::string& tizen_app_id, + double scale, + const std::string& theme, + const std::string& encoded_bundle); //void SendWrtMessage(const Ewk_IPC_Wrt_Message_Data& message); // Pixmap diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.cc b/tizen_src/ewk/efl_integration/public/ewk_context.cc index dc98c32..693dc76 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_context.cc @@ -540,7 +540,17 @@ void ewk_send_widget_info(Ewk_Context *context, EINA_SAFETY_ON_NULL_RETURN(theme); EINA_SAFETY_ON_NULL_RETURN(encodedBundle); EINA_SAFETY_ON_NULL_RETURN(context); - context->SendWidgetInfo(tizen_id, scale, theme, encodedBundle); + context->SetWidgetInfo(tizen_id, scale, theme, encodedBundle); +} + +void ewk_context_tizen_app_id_set(Ewk_Context* context, + const char* tizen_app_id) { + EINA_SAFETY_ON_NULL_RETURN(context); + EINA_SAFETY_ON_NULL_RETURN(tizen_app_id); + // Ewk_Context::SetWidgetInfo() will be changed with removal of argumets + // hardcoded in this call once bug + // http://107.108.218.239/bugzilla/show_bug.cgi?id=15424 is merged. + context->SetWidgetInfo(tizen_app_id, 1.0, "theme", "encoded_bundle"); } Ewk_Application_Cache_Manager* ewk_context_application_cache_manager_get(const Ewk_Context* ewkContext) diff --git a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc index e075dba..339b978 100644 --- a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc @@ -105,8 +105,8 @@ void ContentRendererClientEfl::RenderThreadStarted() { thread->AddObserver(wrt_widget_->GetObserver()); wrt_url_parser_.reset(new WrtUrlParseImpl(wrt_widget_.get())); - std::string tizen_id = command_line.GetSwitchValueASCII( - switches::kTizenId); + std::string tizen_app_id = command_line.GetSwitchValueASCII( + switches::kTizenAppId); std::string theme = command_line.GetSwitchValueASCII( switches::kWidgetTheme); std::string encoded_bundle = command_line.GetSwitchValueASCII( @@ -116,8 +116,8 @@ void ContentRendererClientEfl::RenderThreadStarted() { double scale_factor = 0; base::StringToDouble(scale, &scale_factor); - wrt_widget_->SetWidgetInfo(tizen_id, scale_factor, - theme, encoded_bundle); + wrt_widget_->SetWidgetInfo(tizen_app_id, scale_factor, + theme, encoded_bundle); } render_thread_observer_.reset(new RenderThreadObserverEfl(this)); diff --git a/tizen_src/ewk/efl_integration/wrt/dynamicplugin.cc b/tizen_src/ewk/efl_integration/wrt/dynamicplugin.cc index 2b50cba..c3bedc8 100644 --- a/tizen_src/ewk/efl_integration/wrt/dynamicplugin.cc +++ b/tizen_src/ewk/efl_integration/wrt/dynamicplugin.cc @@ -11,15 +11,29 @@ #include "common/content_switches_efl.h" namespace { +const char* const VERSION_FUNCTION = "DynamicPluginVersion"; const char* const START_SESSION_FUNCTION = "DynamicPluginStartSession"; const char* const STOP_SESSION_FUNCTION = "DynamicPluginStopSession"; const char* const URL_PARSING_FUNCTION = "DynamicUrlParsing"; const char* const SET_WIDGET_INFO_FUNCTION = "DynamicSetWidgetInfo"; const char* const DATABASE_ATTACH_FUNCTION = "DynamicDatabaseAttach"; + +typedef void (*startSessionFun)(const char* tizen_app_id, + v8::Handle context, + int routingHandle, + const char* baseURL); +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); } DynamicPlugin::DynamicPlugin() : m_handle(0), + m_version(0), m_startSession(0), m_stopSession(0), m_parseURL(0), @@ -36,7 +50,17 @@ DynamicPlugin::DynamicPlugin() return; } - *reinterpret_cast(&m_startSession) = dlsym(m_handle, START_SESSION_FUNCTION); + unsigned int (*versionFunction)(void); + *reinterpret_cast(&versionFunction) = dlsym(m_handle, VERSION_FUNCTION); + if (versionFunction) { + m_version = versionFunction(); + if (m_version != 0 && m_version != 1) { + LOG(ERROR) << "Unknown plugin version: " << m_version << "!\n"; + return; + } + } + + m_startSession = dlsym(m_handle, START_SESSION_FUNCTION); if (!m_startSession) { LOG(ERROR) << "No " << START_SESSION_FUNCTION << " symbol found!\n"; } @@ -64,7 +88,7 @@ DynamicPlugin::DynamicPlugin() m_databaseAttach(1); } -void DynamicPlugin::startSession(const char* tizen_id, +void DynamicPlugin::startSession(const char* tizen_app_id, v8::Handle context, int routingHandle, double scaleFactor, @@ -73,28 +97,40 @@ void DynamicPlugin::startSession(const char* tizen_id, const char* baseURL) { if (!m_startSession || !m_databaseAttach) return; - m_startSession(tizen_id, context, routingHandle, - scaleFactor, encodedBundle, - theme, baseURL); + 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: { + auto startSession = reinterpret_cast(m_startSession); + startSession(tizen_app_id, context, routingHandle, baseURL); + break; } + default: + return; + } } -void DynamicPlugin::stopSession(const char* tizen_id, +void DynamicPlugin::stopSession(const char* tizen_app_id, v8::Handle context) { if (!m_stopSession || !m_databaseAttach) return; - m_stopSession(tizen_id, context); + m_stopSession(tizen_app_id, context); } -void DynamicPlugin::parseURL(std::string* old_url, std::string* new_url, const char* tizen_id) { +void DynamicPlugin::parseURL(std::string* old_url, + std::string* new_url, + const char* tizen_app_id) { if (!m_parseURL || !m_databaseAttach) return; - m_parseURL(old_url, new_url, tizen_id); + m_parseURL(old_url, new_url, tizen_app_id); } -void DynamicPlugin::setWidgetInfo(const std::string& tizen_id) { +void DynamicPlugin::setWidgetInfo(const std::string& tizen_app_id) { if (!m_setWidgetInfo) return; - m_setWidgetInfo(tizen_id.c_str()); + m_setWidgetInfo(tizen_app_id.c_str()); } DynamicPlugin::~DynamicPlugin() { diff --git a/tizen_src/ewk/efl_integration/wrt/dynamicplugin.h b/tizen_src/ewk/efl_integration/wrt/dynamicplugin.h index 7f8d29d..933301c 100644 --- a/tizen_src/ewk/efl_integration/wrt/dynamicplugin.h +++ b/tizen_src/ewk/efl_integration/wrt/dynamicplugin.h @@ -11,36 +11,29 @@ class Ewk_Wrt_Message_Data; -typedef void (*startSessionFun)(const char* tizen_id, - v8::Handle context, - int routingHandle, - double scaleFactor, - const char* encodedBundle, - const char* theme, - const char* baseURL); -typedef void (*stopSessionFun)(const char* tizen_id, +typedef void (*stopSessionFun)(const char* tizen_app_id, v8::Handle context); typedef void (*onIPCMessageFun)( const Ewk_Wrt_Message_Data& data); typedef void (*parseUrlFun)(std::string* old_url, std::string* new_url, - const char* tizen_id); -typedef void (*setWidgetInfoFun)(const char* tizen_id); + const char* tizen_app_id); +typedef void (*setWidgetInfoFun)(const char* tizen_app_id); typedef void (*databaseAttachFun)(int databaseAttach); class DynamicPlugin { public: - void startSession(const char* tizen_id, + 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_id, + void stopSession(const char* tizen_app_id, v8::Handle context); - void parseURL(std::string* old_url, std::string* new_url, const char* tizen_id); - void setWidgetInfo(const std::string& tizen_id); + void parseURL(std::string* old_url, std::string* new_url, const char* tizen_app_id); + void setWidgetInfo(const std::string& tizen_app_id); void messageReceived(const Ewk_Wrt_Message_Data& data); ~DynamicPlugin(); @@ -53,7 +46,8 @@ class DynamicPlugin { DynamicPlugin& operator=(const DynamicPlugin&); void* m_handle; - startSessionFun m_startSession; + unsigned int m_version; + void* m_startSession; stopSessionFun m_stopSession; parseUrlFun m_parseURL; setWidgetInfoFun m_setWidgetInfo; diff --git a/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc b/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc index 662e360..b6ad0ba 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc +++ b/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc @@ -46,9 +46,9 @@ class WrtURLRequestJob : public net::URLRequestFileJob { // dagerous as it expects to be loaded in the render process. std::string old_url = request()->url().possibly_invalid_spec(); std::string s_new_url; - std::string tizen_id = WrtWidgetHost::Get()->TizenId(); + std::string tizen_app_id = WrtWidgetHost::Get()->TizenAppId(); DynamicPlugin::instance().parseURL( - &old_url, &s_new_url, tizen_id.c_str()); + &old_url, &s_new_url, tizen_app_id.c_str()); OnUrlRetrieved(GURL(s_new_url)); } else { URLRequestFileJob::Start(); diff --git a/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc b/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc index 79e041f..5f75ddd 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc +++ b/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc @@ -112,7 +112,7 @@ bool WrtWidgetHost::InWrt() const { // 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::TizenId() const { +std::string WrtWidgetHost::TizenAppId() const { return std::string(); } diff --git a/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h b/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h index 58d25f3..6266cd9 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h +++ b/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.h @@ -32,7 +32,7 @@ class WrtWidgetHost { bool InWrt() const; - std::string TizenId() const; + std::string TizenAppId() const; private: friend class WrtWidgetHostMessageFilter; diff --git a/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc b/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc index 34f2e2a..15e98e2 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc +++ b/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc @@ -59,26 +59,26 @@ content::RenderThreadObserver* WrtWidget::GetObserver() { return observer_; } -void WrtWidget::SetWidgetInfo(const std::string& tizen_id, +void WrtWidget::SetWidgetInfo(const std::string& tizen_app_id, double scaleFactor, const std::string& theme, const std::string& encodedBundle) { - tizen_id_ = tizen_id; + tizen_app_id_ = tizen_app_id; scale_ = scaleFactor; theme_ = theme; encodedBundle_ = encodedBundle; - DynamicPlugin::instance().setWidgetInfo(tizen_id_); + DynamicPlugin::instance().setWidgetInfo(tizen_app_id_); } bool WrtWidget::IsWidgetInfoSet() const { - return !tizen_id_.empty(); + return !tizen_app_id_.empty(); } void WrtWidget::ParseUrl(const GURL& url, GURL& new_url) { - if (!tizen_id_.empty()) { + if (!tizen_app_id_.empty()) { std::string old_url = url.possibly_invalid_spec(); std::string s_new_url; - DynamicPlugin::instance().parseURL(&old_url, &s_new_url, tizen_id_.c_str()); + DynamicPlugin::instance().parseURL(&old_url, &s_new_url, tizen_app_id_.c_str()); if (s_new_url.empty()) new_url = url; else @@ -91,8 +91,8 @@ void WrtWidget::ParseUrl(const GURL& url, GURL& new_url) { void WrtWidget::StartSession(v8::Handle context, int routingHandle, const std::string& baseURL) { - if (!tizen_id_.empty() && !context.IsEmpty()) { - DynamicPlugin::instance().startSession(tizen_id_.c_str(), + if (!tizen_app_id_.empty() && !context.IsEmpty()) { + DynamicPlugin::instance().startSession(tizen_app_id_.c_str(), context, routingHandle, scale_, @@ -103,12 +103,12 @@ void WrtWidget::StartSession(v8::Handle context, } void WrtWidget::StopSession(v8::Handle context) { - if (!tizen_id_.empty() && !context.IsEmpty()) { - DynamicPlugin::instance().stopSession(tizen_id_.c_str(), context); + if (!tizen_app_id_.empty() && !context.IsEmpty()) { + DynamicPlugin::instance().stopSession(tizen_app_id_.c_str(), context); } } void WrtWidget::MessageReceived(const Ewk_Wrt_Message_Data& data) { - if (!tizen_id_.empty()) + if (!tizen_app_id_.empty()) DynamicPlugin::instance().messageReceived(data); } diff --git a/tizen_src/ewk/efl_integration/wrt/wrtwidget.h b/tizen_src/ewk/efl_integration/wrt/wrtwidget.h index 0caf364..7e2b00b 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrtwidget.h +++ b/tizen_src/ewk/efl_integration/wrt/wrtwidget.h @@ -23,7 +23,7 @@ class WrtWidget { content::RenderThreadObserver* GetObserver(); - void SetWidgetInfo(const std::string& tizen_id, + void SetWidgetInfo(const std::string& tizen_app_id, double scaleFactor, const std::string& theme, const std::string& encodedBundle); @@ -44,7 +44,7 @@ class WrtWidget { double scale_; std::string encodedBundle_; std::string theme_; - std::string tizen_id_; + std::string tizen_app_id_; WrtRenderThreadObserver* observer_; }; diff --git a/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/chromium/bundle_sample.cc b/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/chromium/bundle_sample.cc index 86a643b..8e53346 100644 --- a/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/chromium/bundle_sample.cc +++ b/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/chromium/bundle_sample.cc @@ -12,12 +12,13 @@ void Run(const char* source) { } } // namespace -extern "C" EXPORT void DynamicPluginStartSession(int widget_id, +extern "C" EXPORT unsigned int DynamicPluginVersion(void) { + return 1; +} + +extern "C" EXPORT void DynamicPluginStartSession(const char* tizne_app_id, v8::Handle context, int routingHandle, - double scale, - const char* encodeBundle, - const char* theme, const char* baseURL) { Run("document.write(\"DynamicPluginStartSession\");"); } diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_new_with_injected_bundle_path_func.cc b/tizen_src/ewk/unittest/utc_blink_ewk_context_new_with_injected_bundle_path_func.cc index bc55cc3..b712306 100644 --- a/tizen_src/ewk/unittest/utc_blink_ewk_context_new_with_injected_bundle_path_func.cc +++ b/tizen_src/ewk/unittest/utc_blink_ewk_context_new_with_injected_bundle_path_func.cc @@ -65,8 +65,8 @@ TEST_F(utc_blink_ewk_context_new_with_injected_bundle_path_func, POS_TEST1) { webview = CreateWindow(); const char simpleHTML[] = ""; + ewk_context_tizen_app_id_set(ewk_view_context_get(webview), "1"); ASSERT_TRUE(ewk_view_html_string_load(webview, simpleHTML, NULL, NULL)); - ewk_send_widget_info(ewk_view_context_get(webview), "1", 1.0, "theme", "encodeBundle"); runWithTimer(); ASSERT_EQ(Success, EventLoopStart()); } -- 2.7.4