_this.addonManager.isAddonAvailable();
options.launchMode = appControl.getData('http://samsung.com/appcontrol/data/launch_mode');
_this.webApplication = new WebApplication(options);
+ if (!_this.debug_mode && wrt.needUseInspector()) {
+ _this.webApplication.defaultSrc = src;
+ src = "about:blank";
+ }
_this.webApplication.mainWindow.loadURL(src);
_this.webApplication.prelaunch(_this.addonManager.prelaunch_path, src);
} else {
this.backgroundSupport = wrt.getBackgroundSupport();
this.multitaskingSupport = wrt.getMultitaskingSupport();
this.debugport = 0;
+ this.debugDialogShow = false;
+ this.defaultSrc = '';
if (options.launchMode == 'backgroundAtStartup') {
console.log('backgroundAtStartup');
this.preloadState = 'preload';
if (self.loadFinished && self.runningStatus == 'behind') {
self.suspend();
}
+ if (self.debugDialogShow && self.runningStatus == 'DialogClose') {
+ console.log(`runningStatus is DialogClose, src is ${self.defaultSrc}`);
+ self.debugDialogShow = false;
+ self.mainWindow.loadURL(self.defaultSrc);
+ }
});
}
getWindowOption(options) {
wrt.notifyAppStatus('preload');
}
if(self.debugport && self.isTVProfile) {
- const kDebugPopupScript = "alert('port number :" + self.debugport +"')";
- wrt.executeJS(self.mainWindow.webContents, kDebugPopupScript);
+ let message = self.debugport.toString() +
+ "\r\nFast RWI is used, [about:blank] is loaded fist instead of \r\n[" +
+ self.defaultSrc +
+ "]\r\nClick OK button will start the real loading.\r\nNotes:\r\nPlease " +
+ "connect to RWI in PC before click OK button.\r\nThen you can get " +
+ "network log from the initial loading.\r\nPlease click Record button " +
+ "in Timeline panel in PC before click OK button,\r\nThen you can get " +
+ "profile log from the initial loading."
+ self.debugDialogShow = true;
self.debugport = 0;
+ wrt.modalDialog(self.mainWindow.webContents, message);
}
});
}