From: jaekuk, lee Date: Fri, 24 Sep 2021 02:17:51 +0000 (+0900) Subject: [Addon] Add reload value to send to addon X-Git-Tag: submit/tizen/20210927.084538~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b93beb79625821de764b973f96cbb9d034437f40;p=platform%2Fframework%2Fweb%2Fwrtjs.git [Addon] Add reload value to send to addon This patch sends reload value to addon to synchronize app's window information with addon when resuming app. Change-Id: I53f2cd613a6c271cfb445d20e84db9230991dee0 Signed-off-by: jaekuk, lee --- diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts old mode 100644 new mode 100755 index 4d4872ad..52f69bb0 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -43,6 +43,7 @@ export class WebApplication { inQuit: boolean = false; profileDelegate: WebApplicationDelegate; splashShown: boolean = false; + reload: boolean = false; constructor(options: RuntimeOption) { if (wrt.tv) { @@ -272,13 +273,13 @@ export class WebApplication { let loadInfo = appControl.getLoadInfo(); let src = loadInfo.getSrc(); - let reload = loadInfo.getReload() || this.profileDelegate.needReload(src); + this.reload = loadInfo.getReload() || this.profileDelegate.needReload(src); // handle http://tizen.org/appcontrol/operation/main operation specially. // only menu-screen app can send launch request with main operation. // in this case, web app should have to resume web app not reset. - if (reload && appControl.getOperation() == 'http://tizen.org/appcontrol/operation/main') - reload = false; - if (reload) + if (this.reload && appControl.getOperation() == 'http://tizen.org/appcontrol/operation/main') + this.reload = false; + if (this.reload) this.handleAppControlReload(src); else this.sendAppControlEvent(); @@ -333,7 +334,8 @@ export class WebApplication { resume() { console.log('WebApplication : resume'); this.suspended = false; - addonManager.emit('lcResume', this.mainWindow.id); + addonManager.emit('lcResume', this.mainWindow.id, this.reload); + this.reload = false; if (!this.backgroundRunnable()) this.windowList.forEach((window) => window.setEnabled(true));