Chrome Apps background page middleware