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

Unified Diff: Source/modules/serviceworkers/FetchEvent.h

Issue 304053003: ServiceWorker: support Request.{url,method,origin,headers} [blink] (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/FetchEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/FetchEvent.h
diff --git a/Source/modules/serviceworkers/FetchEvent.h b/Source/modules/serviceworkers/FetchEvent.h
index 2020b8a2865cade3e56bfbd5dfe1b0ed6da625a7..c78663c57ca866dee392b61afaa1121bd8f4ee03 100644
--- a/Source/modules/serviceworkers/FetchEvent.h
+++ b/Source/modules/serviceworkers/FetchEvent.h
@@ -6,11 +6,13 @@
#define FetchEvent_h
#include "modules/EventModules.h"
+#include "modules/serviceworkers/Request.h"
#include "modules/serviceworkers/RespondWithObserver.h"
namespace WebCore {
class ExecutionContext;
+class Request;
class RespondWithObserver;
// A fetch event is dispatched by the client to a service worker's script
@@ -19,9 +21,13 @@ class RespondWithObserver;
class FetchEvent FINAL : public Event {
public:
static PassRefPtrWillBeRawPtr<FetchEvent> create();
+ // TODO(horo): Remove this.
static PassRefPtrWillBeRawPtr<FetchEvent> create(PassRefPtr<RespondWithObserver>);
+ static PassRefPtrWillBeRawPtr<FetchEvent> create(PassRefPtr<RespondWithObserver>, PassRefPtr<Request>);
virtual ~FetchEvent() { }
+ Request* request() const;
+
void respondWith(const ScriptValue&);
virtual const AtomicString& interfaceName() const OVERRIDE;
@@ -30,10 +36,13 @@ public:
protected:
FetchEvent();
+ // TODO(horo): Remove this.
explicit FetchEvent(PassRefPtr<RespondWithObserver>);
+ FetchEvent(PassRefPtr<RespondWithObserver>, PassRefPtr<Request>);
private:
RefPtr<RespondWithObserver> m_observer;
+ RefPtr<Request> m_request;
};
} // namespace WebCore
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/FetchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698