- Electron version: 1.4.1
- Operating system: -

RegisterURLSchemeAsPrivileged sets the scheme's policies to:
- Secure
- Bypassing CSP
- Allowing Service Workers
- Supporting Fetch API
- CORS Enabled

I want all of those except Bypassing CSP. (Correct me if I'm wrong: Bypassing CSP means I couldn't enforce, say, 'object-src none', because that scheme would bypass the object-src policy. If I'm wrong, please LMK -- this may be a non-issue.)

Could we add an options argument to RegisterURLSchemeAsPrivileged for configuring which is enabled? Something like:

``` js
webFrame.registerURLSchemeAsPrivileged('foo', {
  secure: true,
  bypassCSP: false,
  allowServiceWorkers: true,
  supportFetchAPI: true,
  corsEnabled: true
})
```

For backwards compatibility, the flags would default to `true`, so my usecase would be:

``` js
webFrame.registerURLSchemeAsPrivileged('foo', { bypassCSP: false })
```

If 👍 , I'm happy to write a PR.

atom/renderer/api/atom_api_web_frame.cc
content::RenderFrame::FromWebFrame(web_frame_)->AttachGuest(id);
}
void WebFrame::DetachGuest(int id) {
  content::RenderFrame::FromWebFrame(web_frame_)->DetachGuest(id);
}
void WebFrame::SetSpellCheckProvider(mate::Arguments* args,
                                     const std::string& language,
                                     bool auto_spell_correct_turned_on,
                                     v8::Local<v8::Object> provider) {
  if (!provider->Has(mate::StringToV8(args->isolate(), "spellCheck"))) {
    args->ThrowError("\"spellCheck\" has to be defined");
    return;
  }
  spell_check_client_.reset(new SpellCheckClient(
      language, auto_spell_correct_turned_on, args->isolate(), provider));
  web_frame_->view()->setSpellCheckClient(spell_check_client_.get());
}
void WebFrame::RegisterURLSchemeAsSecure(const std::string& scheme) {
  
  blink::WebSecurityPolicy::registerURLSchemeAsSecure(
      blink::WebString::fromUTF8(scheme));
}
void WebFrame::RegisterURLSchemeAsBypassingCSP(const std::string& scheme) {
  
  blink::WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(
      blink::WebString::fromUTF8(scheme));
}
void WebFrame::RegisterURLSchemeAsPrivileged(const std::string& scheme) {