Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h

Issue 2443103002: service worker: Implement NavigationPreloadManager.getState (Closed)
Patch Set: rm file added in bad merge Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
diff --git a/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
index 612fbe0e6f1c1c9e7af37a985929bc6819905d93..4e935d4dbb79f9fa642ae25f2d1189ac73577bbd 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
@@ -10,6 +10,7 @@
namespace blink {
class ScriptPromiseResolver;
+struct WebNavigationPreloadState;
struct WebServiceWorkerError;
class EnableNavigationPreloadCallbacks final
@@ -27,6 +28,22 @@ class EnableNavigationPreloadCallbacks final
WTF_MAKE_NONCOPYABLE(EnableNavigationPreloadCallbacks);
};
+class GetNavigationPreloadStateCallbacks final
+ : public WebServiceWorkerRegistration::
+ WebGetNavigationPreloadStateCallbacks {
+ public:
+ GetNavigationPreloadStateCallbacks(ScriptPromiseResolver*);
+ ~GetNavigationPreloadStateCallbacks() override;
+
+ // WebGetNavigationPreloadStateCallbacks interface.
+ void onSuccess(const WebNavigationPreloadState&) override;
+ void onError(const WebServiceWorkerError&) override;
+
+ private:
+ Persistent<ScriptPromiseResolver> m_resolver;
+ WTF_MAKE_NONCOPYABLE(GetNavigationPreloadStateCallbacks);
+};
+
} // namespace blink
#endif // NavigationPreloadCallbacks_h

Powered by Google App Engine
This is Rietveld 408576698