Use arrow functions to replace old CoffeeScript => this wrappers

This commit is contained in:
Kevin Sawicki 2016-03-10 11:54:17 -08:00
parent 100ea975bd
commit a3f08c9b51
10 changed files with 176 additions and 212 deletions

View file

@ -1,3 +1,5 @@
'use strict';
const ipcRenderer = require('electron').ipcRenderer;
const remote = require('electron').remote;
@ -37,12 +39,10 @@ var BrowserWindowProxy = (function() {
function BrowserWindowProxy(guestId1) {
this.guestId = guestId1;
this.closed = false;
ipcRenderer.once("ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_CLOSED_" + this.guestId, (function(_this) {
return function() {
BrowserWindowProxy.remove(_this.guestId);
return (_this.closed = true);
};
})(this));
ipcRenderer.once("ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_CLOSED_" + this.guestId, () => {
BrowserWindowProxy.remove(this.guestId);
this.closed = true;
});
}
BrowserWindowProxy.prototype.close = function() {
@ -182,7 +182,7 @@ if (process.openerId != null) {
ipcRenderer.on('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', function (event, isVisible, isMinimized) {
var hasChanged = _isVisible != isVisible || _isMinimized != isMinimized;
if (hasChanged) {
_isVisible = isVisible;
_isMinimized = isMinimized;