this.pendingID = 0;
this.pendingCallbacks = new Map();
this.windowList = [];
- this.firstRendered = false;
this.backgroundSupport = wrt.getBackgroundSupport();
this.debugPort = 0;
this.inspectorSrc = '';
this.defaultBackgroundColor = (wrt.tv ? '#0000' :
((wrt.getPlatformType() === "product_wearable") ? '#000' : '#FFF'));
this.defaultTransparent = (wrt.tv ? true : false);
- this.suspended = false;
this.loadFinished = false;
this.runningStatus = 'none';
this.addonEmitter = null;
detached: true
});
}
+ this.initDisplayDelay(true);
let self = this;
- if (!wrt.showSplashScreen() && !wrt.tv) {
- self.showTimer = setTimeout(() => {
- if (!self.suspended) {
- console.log('FrameRendered not obtained from engine. To show window, timer fired');
- self.mainWindow.emit('ready-to-show');
- }
- }, 2000);
- }
-
this.mainWindow.once('ready-to-show', function() {
console.log('mainWindow ready-to-show');
if (self.showTimer)
self.addonEmitter.emit('contentDidFinishLoad', self.mainWindow.id);
});
}
+ initDisplayDelay(firstLaunch) {
+ // TODO: On 6.0, this causes a black screen on relaunch
+ if (firstLaunch)
+ this.firstRendered = false;
+ this.suspended = false;
+ if (this.showTimer)
+ clearTimeout(this.showTimer);
+ let splashShown = firstLaunch && wrt.showSplashScreen();
+ if (!splashShown && !wrt.tv) {
+ let self = this;
+ self.showTimer = setTimeout(() => {
+ if (!self.suspended) {
+ console.log('FrameRendered not obtained from engine. To show window, timer fired');
+ self.mainWindow.emit('ready-to-show');
+ }
+ }, 2000);
+ }
+ if (!firstLaunch && !this.backgroundRunnable())
+ this.mainWindow.setEnabled(true);
+ }
+ handleAppControlReload(src) {
+ console.log('WebApplication : handleAppControlReload');
+ this.closeWindows();
+ this.initDisplayDelay(false);
+ this.mainWindow.loadURL(src);
+ }
suspendByStatus() {
if (this.preloadStatus === 'readyToShow' ||
this.preloadStatus === 'preload' ||