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

Side by Side Diff: Source/modules/serviceworkers/FetchEvent.h

Issue 180843003: Start to implement FetchEvent for ServiceWorker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for landing Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/FetchEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FetchEvent_h
6 #define FetchEvent_h
7
8 #include "core/events/Event.h"
9 #include "modules/serviceworkers/RespondWithObserver.h"
10
11 namespace WebCore {
12
13 class ExecutionContext;
14 class RespondWithObserver;
15
16 // A fetch event is dispatched by the client to a service worker's script
17 // context. RespondWithObserver can be used to notify the client about the
18 // service worker's response.
19 class FetchEvent FINAL : public Event {
20 public:
21 static PassRefPtr<FetchEvent> create();
22 static PassRefPtr<FetchEvent> create(PassRefPtr<RespondWithObserver>);
23 virtual ~FetchEvent() { }
24
25 void respondWith(const ScriptValue&);
26
27 virtual const AtomicString& interfaceName() const OVERRIDE;
28
29 protected:
30 FetchEvent();
31 explicit FetchEvent(PassRefPtr<RespondWithObserver>);
32
33 private:
34 RefPtr<RespondWithObserver> m_observer;
35 };
36
37 } // namespace WebCore
38
39 #endif // FetchEvent_h
OLDNEW
« 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