Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl

Issue 2389693002: service worker: Add NavigationPreload runtime flag and skeleton interface (Closed)
Patch Set: forgot some gni Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl
diff --git a/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl
new file mode 100644
index 0000000000000000000000000000000000000000..3ae8a0c237703eee59171e2af6a3f992c513ddfd
--- /dev/null
+++ b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl
@@ -0,0 +1,16 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO(falken): Revise link when this lands in the spec:
+// https://github.com/w3c/ServiceWorker/issues/920
+[
+ RuntimeEnabled=ServiceWorkerNavigationPreload,
+ SecureContext,
+ Exposed=(Window,Worker),
+] interface NavigationPreloadManager {
+ [CallWith=ScriptState] Promise<void> enable();
+ [CallWith=ScriptState] Promise<void> disable();
+ [CallWith=ScriptState] Promise<void> setHeaderValue(ByteString value);
+ [CallWith=ScriptState] Promise<NavigationPreloadState> getState();
+};

Powered by Google App Engine