this.extensionManager = null;
this.isLaunched = false;
this.debug_mode = false;
+ this.need_inspector = false;
var _this = this;
app.on('before-quit', function(event) {
// FIX ME : It must be supplemented to set a specific path
wrt.setCookiePath();
- // AUL public key - To support debug argument
- if (!_this.debug_mode && appControl.getData('__AUL_DEBUG__') == "1") {
+ // AUL public key/Vconf - To support inspector
+ if (!_this.debug_mode && _this.checkInspectorCondition(appControl)) {
_this.debug_mode = true;
_this.launchInspector(appControl);
}
return _this.extensionManager.deactivate(app, name);
});
}
+ checkInspectorCondition(appControl) {
+ var _this = this;
+ let bundle_debug = (appControl.getData('__AUL_DEBUG__') === "1");
+ _this.need_inspector = wrt.needUseInspector();
+ return (bundle_debug || _this.need_inspector);
+ }
launchInspector(appControl) {
- var data = { "port" : [ wrt.getDebuggingPort().toString() ] };
+ var _this = this;
+ var portnum = wrt.getDebuggingPort();
+ var data = { "port" : [ portnum.toString() ] };
+ if(_this.need_inspector) {
+ _this.webApplication.debugport = portnum;
+ }
appControl.reply(data);
}
}
this.firstRendered = false;
this.backgroundSupport = wrt.getBackgroundSupport();
this.multitaskingSupport = wrt.getMultitaskingSupport();
+ this.debugport = 0;
if (options.launchMode == 'backgroundAtStartup') {
console.log('backgroundAtStartup');
this.preloadState = 'preload';
if (self.runningStatus !== 'behind')
wrt.notifyAppStatus('preload');
}
+ if((self.debugport) && (wrt.getPlatformType() === "product_tv")) {
+ const kDebugPopupScript = "alert('port number :" + self.debugport +"')";
+ wrt.executeJS(self.mainWindow.webContents, kDebugPopupScript);
+ self.debugport = 0;
+ }
});
}
suspend() {