From: Jihoon Chung Date: Sat, 1 Jun 2013 11:16:08 +0000 (+0900) Subject: Replace ipc message to read static value X-Git-Tag: accepted/tizen/20131002.084327~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1c0ceec58a5ffb0fd21bd93992776afbc4ff341;p=platform%2Fframework%2Fweb%2Fwrt-plugins-common.git Replace ipc message to read static value [Issue#] N/A [Problem] launch.application API is crashed [Cause] During send IPC from plugin, UI process send Messages::WebPage::HitTestResultAtPoint to WebProcess. Conlict is occurred during dispatch IPC message. [Solution] Replace IPC to get x window handle to static value [SCMRequest] N/A Change-Id: I350bf6400887729154b4d05929bded98f976002f --- diff --git a/src/plugins-ipc-message/ipc_message_support.cpp b/src/plugins-ipc-message/ipc_message_support.cpp index db1e8a8..a6b1fa1 100644 --- a/src/plugins-ipc-message/ipc_message_support.cpp +++ b/src/plugins-ipc-message/ipc_message_support.cpp @@ -30,6 +30,7 @@ #include static WKBundleRef s_injectedBundleRef = NULL; +static unsigned int s_xWindowHandle = 0; namespace { std::string toString(WKStringRef str) @@ -50,6 +51,12 @@ void IPCMessageSupport::setWKBundleRef(WKBundleRef bundleRef) s_injectedBundleRef = bundleRef; } +void IPCMessageSupport::setXwindowHandle(unsigned int handle) +{ + LogDebug("setXwindowHandle called"); + s_xWindowHandle = handle; +} + const char* IPCMessageSupport::sendMessageToUiProcess( const char* name, const char* body) @@ -65,6 +72,18 @@ const char* IPCMessageSupport::sendMessageToUiProcess( if (!name) { return NULL; } + + if (!strcmp(name, "tizen://getWindowHandle")) { + if (s_xWindowHandle == 0) { + return NULL; + } else { + std::stringstream ss; + ss << s_xWindowHandle; + std::string ret = ss.str(); + return strdup(ret.c_str()); + } + } + WKStringRef bodyWKString = NULL; WKStringRef nameWKString = WKStringCreateWithUTF8CString(name); if (body) { diff --git a/src/plugins-ipc-message/ipc_message_support.h b/src/plugins-ipc-message/ipc_message_support.h index 0bde70a..fa96e3f 100644 --- a/src/plugins-ipc-message/ipc_message_support.h +++ b/src/plugins-ipc-message/ipc_message_support.h @@ -27,6 +27,7 @@ namespace IPCMessageSupport { void setWKBundleRef(WKBundleRef bundleRef); +void setXwindowHandle(unsigned int handle); const char* sendMessageToUiProcess(const char* name, const char* body); }