I tired with the offscreen mode and here are the problems I found:
- [x] <del>The `data` of `paint` event is empty when loading simple local pages.</del>
- [x] The size of `data` is wrong, current implement uses the size of pointer (`sizeof(bitmap_pixels)`).
- [x] Crashes when opening devtools for offscreen window.
- [x] We should probably show a dummy view indicating it is offscreen instead of provide NULL.
- [x] The offscreen window is affecting the rendering of other windows. Try running `./script/test.py -g offscreen` and then refreshing the window.

/cc @gerhardberger @brenca

atom/browser/api/atom_api_web_contents.cc
v8::Isolate* isolate, content::WebContents* web_contents) {
  
  auto existing = TrackableObject::FromWrappedClass(isolate, web_contents);
  if (existing)
    return mate::CreateHandle(isolate, static_cast<WebContents*>(existing));
  
  return mate::CreateHandle(isolate, new WebContents(isolate, web_contents));
}
mate::Handle<WebContents> WebContents::Create(
    v8::Isolate* isolate, const mate::Dictionary& options) {
  return mate::CreateHandle(isolate, new WebContents(isolate, options));
}
}  
}  
namespace {
using atom::api::WebContents;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
                v8::Local<v8::Context> context, void* priv) {
  v8::Isolate* isolate = context->GetIsolate();
  mate::Dictionary dict(isolate, exports);
  dict.Set("WebContents", WebContents::GetConstructor(isolate)->GetFunction());
  dict.SetMethod("create", &WebContents::Create);
  dict.SetMethod("fromId", &mate::TrackableObject<WebContents>::FromWeakMapID);
  dict.SetMethod("getAllWebContents",
                 &mate::TrackableObject<WebContents>::GetAll);
}
}  
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_web_contents, Initialize)