[WRTjs][VD] Support skip inspector popup 35/315635/1
authorzhaosy <shiyusy.zhao@samsung.com>
Wed, 4 Dec 2024 01:35:39 +0000 (09:35 +0800)
committerzhaosy <shiyusy.zhao@samsung.com>
Wed, 4 Dec 2024 01:35:39 +0000 (09:35 +0800)
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 <shiyusy.zhao@samsung.com>
wrt_app/common/web_application_delegate.ts
wrt_app/src/tv/web_application_tv.ts
wrt_app/src/web_application.ts

index 1ac4626d247b43c389afbbf526fc3704084840b2..95bd60dc6f77052bb0c6386a462de8a766987d8c 100644 (file)
@@ -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) {
index e1f0d0aa1227353593bf6de2882d6beb1074c531..a6cfae281946e8d96c064efad916bdeb4aac40b2 100644 (file)
@@ -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) {
index e853e581fc3096c6dfaef823bbc4fb59a70cfbee..44acf03475a123d91864f0b591ba47f20e1da0d7 100644 (file)
@@ -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;