protocol: api to register schemes that can handle service worker

This commit is contained in:
Robo 2015-12-09 00:51:46 +05:30
parent 5e9aca4524
commit 855d49100f
12 changed files with 86 additions and 8 deletions

View file

@ -27,6 +27,7 @@
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginParams.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
#include "third_party/WebKit/public/web/WebView.h"
@ -129,6 +130,9 @@ void AtomRendererClient::RenderFrameCreated(
content::RenderFrame* render_frame) {
new PepperHelper(render_frame);
new AtomRenderFrameObserver(render_frame, this);
// Allow file scheme to handle service worker by default.
blink::WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers("file");
}
void AtomRendererClient::RenderViewCreated(content::RenderView* render_view) {