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

Side by Side Diff: public/web/WebServiceWorkerContextProxy.h

Issue 1156703003: ServiceWorker: Introduce ExtendableMessageEvent to replace MessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update Created 5 years, 5 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
« no previous file with comments | « public/web/WebServiceWorkerContextClient.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define WebServiceWorkerContextProxy_h 32 #define WebServiceWorkerContextProxy_h
33 33
34 #include "public/platform/WebGeofencingEventType.h" 34 #include "public/platform/WebGeofencingEventType.h"
35 #include "public/platform/WebMessagePortChannel.h" 35 #include "public/platform/WebMessagePortChannel.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 struct WebCircularGeofencingRegion; 39 struct WebCircularGeofencingRegion;
40 struct WebCrossOriginServiceWorkerClient; 40 struct WebCrossOriginServiceWorkerClient;
41 struct WebNotificationData; 41 struct WebNotificationData;
42 struct WebServiceWorkerClientInfo;
43 class WebServiceWorker;
42 class WebServiceWorkerRegistration; 44 class WebServiceWorkerRegistration;
43 class WebServiceWorkerRequest; 45 class WebServiceWorkerRequest;
44 class WebString; 46 class WebString;
45 47
46 // A proxy interface to talk to the worker's GlobalScope implementation. 48 // A proxy interface to talk to the worker's GlobalScope implementation.
47 // All methods of this class must be called on the worker thread. 49 // All methods of this class must be called on the worker thread.
48 class WebServiceWorkerContextProxy { 50 class WebServiceWorkerContextProxy {
49 public: 51 public:
50 virtual ~WebServiceWorkerContextProxy() { } 52 virtual ~WebServiceWorkerContextProxy() { }
51 53
52 virtual void setRegistration(WebServiceWorkerRegistration*) = 0; 54 virtual void setRegistration(WebServiceWorkerRegistration*) = 0;
53 virtual void dispatchActivateEvent(int eventID) = 0; 55 virtual void dispatchActivateEvent(int eventID) = 0;
54 // FIXME: This needs to pass the active service worker info. 56 // FIXME: This needs to pass the active service worker info.
55 virtual void dispatchInstallEvent(int installEventID) = 0; 57 virtual void dispatchInstallEvent(int installEventID) = 0;
56 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ est& webRequest) = 0; 58 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ est& webRequest) = 0;
57 59
58 virtual void dispatchGeofencingEvent(int eventID, WebGeofencingEventType, co nst WebString& regionID, const WebCircularGeofencingRegion&) = 0; 60 virtual void dispatchGeofencingEvent(int eventID, WebGeofencingEventType, co nst WebString& regionID, const WebCircularGeofencingRegion&) = 0;
59 61
60 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray& channels) = 0; 62 virtual void dispatchMessageEvent(int eventID, const WebServiceWorkerClientI nfo&, const WebString& message, const WebMessagePortChannelArray& channels) = 0;
63
64 virtual void dispatchMessageEvent(int eventID, WebServiceWorker*, const WebS tring& message, const WebMessagePortChannelArray& channels) = 0;
61 65
62 virtual void dispatchNotificationClickEvent(int eventID, int64_t notificatio nID, const WebNotificationData&) = 0; 66 virtual void dispatchNotificationClickEvent(int eventID, int64_t notificatio nID, const WebNotificationData&) = 0;
63 67
64 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0; 68 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0;
65 69
66 virtual void dispatchCrossOriginConnectEvent(int eventID, const WebCrossOrig inServiceWorkerClient&) = 0; 70 virtual void dispatchCrossOriginConnectEvent(int eventID, const WebCrossOrig inServiceWorkerClient&) = 0;
67 71
68 virtual void dispatchCrossOriginMessageEvent(const WebCrossOriginServiceWork erClient&, const WebString& message, const WebMessagePortChannelArray&) = 0; 72 virtual void dispatchCrossOriginMessageEvent(const WebCrossOriginServiceWork erClient&, const WebString& message, const WebMessagePortChannelArray&) = 0;
69 73
70 // Once the ServiceWorker has finished handling the sync event 74 // Once the ServiceWorker has finished handling the sync event
71 // didHandleSyncEvent is called on the context client. 75 // didHandleSyncEvent is called on the context client.
72 virtual void dispatchSyncEvent(int syncEventID) = 0; 76 virtual void dispatchSyncEvent(int syncEventID) = 0;
73 77
74 virtual void addStashedMessagePorts(const WebMessagePortChannelArray& channe ls, const WebVector<WebString>& channelNames) = 0; 78 virtual void addStashedMessagePorts(const WebMessagePortChannelArray& channe ls, const WebVector<WebString>& channelNames) = 0;
75 }; 79 };
76 80
77 } // namespace blink 81 } // namespace blink
78 82
79 #endif // WebServiceWorkerContextProxy_h 83 #endif // WebServiceWorkerContextProxy_h
OLDNEW
« no previous file with comments | « public/web/WebServiceWorkerContextClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698