My proposal:
Let AppWindow.prototype.setVisible call this.element.setAttribute(true or false) as usual.

But for lockscreenWindow, let lockscreenWindowManager to call <code>this.states.instance.setVisible(true)</code> when 'screenchange' or 'lock' event is caught in lockscreen_window_manager.js.