From: DongHyun Song Date: Tue, 30 Jun 2020 01:24:03 +0000 (+0900) Subject: [VD][Service] Add getApplicationId() for extensions X-Git-Tag: submit/tizen/20200709.080654~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F237379%2F3;p=platform%2Fframework%2Fweb%2Fwrtjs.git [VD][Service] Add getApplicationId() for extensions webapis.getApplicationId() will be used to get the current application ID by eden preview webapis. Previously ContentServiceManager is getting the sender application ID from messsage port parameter, but in case of global wrt-service, it is org.tizen.chromium-efl.wrt-service, not expected application ID. So that eden preview webapi can get the intended application ID, this API will be used in eden preview side. Change-Id: Ibfeddefe384da92b7ecbeb3d72f14bf5c26c1eef Signed-off-by: DongHyun Song --- diff --git a/wrt_app/common/service_manager.js b/wrt_app/common/service_manager.js index a3d1952..a699a6f 100644 --- a/wrt_app/common/service_manager.js +++ b/wrt_app/common/service_manager.js @@ -28,8 +28,10 @@ function startService(id, filename) { sandbox[id].module.exports.onStop = () => { callFunctionInContext('module.exports.onExit', sandbox[id]); }; - if (wrt.tv) + if (wrt.tv) { sandbox[id].webapis = webapis; + sandbox[id].webapis.getApplicationId = () => { return id; } + } if (is_global_service) { const permissions = wrt.getPrivileges(id);