- 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.h
}
namespace mate {
class Arguments;
}
namespace atom {
namespace api {
class SpellCheckClient;
class WebFrame : public mate::Wrappable<WebFrame> {
 public:
  static mate::Handle<WebFrame> Create(v8::Isolate* isolate);
  static void BuildPrototype(v8::Isolate* isolate,
                             v8::Local<v8::FunctionTemplate> prototype);
 private:
  explicit WebFrame(v8::Isolate* isolate);
  ~WebFrame() override;
  void SetName(const std::string& name);
  double SetZoomLevel(double level);
  double GetZoomLevel() const;
  double SetZoomFactor(double factor);
  double GetZoomFactor() const;
  void SetZoomLevelLimits(double min_level, double max_level);