callbackWrapper = function (getAuthTokenCallbackParam) {
      access_token = getAuthTokenCallbackParam;
      // TODO: error conditions?
      if (typeof access_token !== 'undefined')
        callback({ access_token: access_token});
      else
        callback();
    }
gapi-chrome-apps version 0.001

Provides the Google API javascript client 'gapi' as
appropriate for hosted websites, or if in a Chrome packaged
app implement a minimal set of functionality that is Content
Security Policy compliant and uses the chrome identity api.

https://github.com/GoogleChrome/chrome-app-samples/tree/master/gapi-chrome-apps-lib