From: zhaosy Date: Wed, 4 Dec 2024 01:35:39 +0000 (+0800) Subject: [WRTjs][VD] Support skip inspector popup X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf16d9b785187fb08d189c0643ca7ad0e1e69720;p=platform%2Fframework%2Fweb%2Fwrtjs.git [WRTjs][VD] Support skip inspector popup In b2b product, sometimes, developer don't want to show inspector popup in RWI case, so support skip inspector popup. How to skip inspector popup: 1) Launch AppInfoViewer(mute + 1 + 2 + 2 + 6 + exit) 2) Select DebugInfo 3) Press UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT 4) Select On option Refer to : https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/320893/ Change-Id: If00f17ced964801e924cbdbe44bcad2b5130def2 Signed-off-by: zhaosy --- diff --git a/wrt_app/common/web_application_delegate.ts b/wrt_app/common/web_application_delegate.ts index 1ac4626d..95bd60dc 100644 --- a/wrt_app/common/web_application_delegate.ts +++ b/wrt_app/common/web_application_delegate.ts @@ -33,7 +33,7 @@ export class WebApplicationDelegate { handleProxyInfo(authInfo: any, callback: any) { return false; } initialize(options: RuntimeOption) { } isBackgroundLaunch() { return false; } - needInpectorGuide() { return false; } + needInpectorGuide() { return 'no_need_inspector'; } needReload(src: string) { let originalUrl = this.webApplication.mainWindow.webContents.getURL(); if (src !== originalUrl) { diff --git a/wrt_app/src/tv/web_application_tv.ts b/wrt_app/src/tv/web_application_tv.ts index e1f0d0aa..a6cfae28 100644 --- a/wrt_app/src/tv/web_application_tv.ts +++ b/wrt_app/src/tv/web_application_tv.ts @@ -172,14 +172,19 @@ Then you can get profile log from the initial loading.`; needInpectorGuide() { if (this.isBackgroundLaunch()) { - return false; + return 'no_need_inspector'; } if (this.tv.needUseInspector()) { + if (this.tv.skipInspectorPopup()) { + console.log('skip Inspector Popup'); + return 'need_inspector_without_popup'; + } + this.inspectorSrc = this.webApplication.contentSrc; this.webApplication.contentSrc = 'about:blank'; - return true; + return 'need_inspector_with_popup'; } - return false; + return 'no_need_inspector'; } needReload(src: string) { diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index e853e581..44acf034 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -311,8 +311,7 @@ export class WebApplication { console.log('launchInspectorIfNeeded'); let needInpectorGuide = this.profileDelegate.needInpectorGuide(); let hasAulDebug = (appControl.getData('__AUL_DEBUG__') === '1'); - - if (hasAulDebug || needInpectorGuide) { + if (hasAulDebug || needInpectorGuide !== 'no_need_inspector') { let debugPort = wrt.startInspectorServer(); let data = { "port": [debugPort.toString()] }; this.debugPort = debugPort;