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

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

Issue 185643009: Implement ServiceWorker::postMessage() [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass raw pointer -> PassOwnPtr 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 | « public/platform/WebServiceWorker.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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebServiceWorkerContextProxy_h 31 #ifndef WebServiceWorkerContextProxy_h
32 #define WebServiceWorkerContextProxy_h 32 #define WebServiceWorkerContextProxy_h
33 33
34 #include "public/platform/WebMessagePortChannel.h"
35
34 namespace blink { 36 namespace blink {
35 37
36 class WebString; 38 class WebString;
37 39
38 // A proxy interface to talk to the worker's GlobalScope implementation. 40 // A proxy interface to talk to the worker's GlobalScope implementation.
39 // All methods of this class must be called on the worker thread. 41 // All methods of this class must be called on the worker thread.
40 class WebServiceWorkerContextProxy { 42 class WebServiceWorkerContextProxy {
41 public: 43 public:
42 virtual ~WebServiceWorkerContextProxy() { } 44 virtual ~WebServiceWorkerContextProxy() { }
43 45
44 // FIXME: This needs to pass the active service worker info. 46 // FIXME: This needs to pass the active service worker info.
45 virtual void dispatchInstallEvent(int installEventID) = 0; 47 virtual void dispatchInstallEvent(int installEventID) = 0;
46 // FIXME: This needs to pass the fetch request info. 48 // FIXME: This needs to pass the fetch request info.
47 virtual void dispatchFetchEvent(int fetchEventID) = 0; 49 virtual void dispatchFetchEvent(int fetchEventID) = 0;
48 50
51 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray& channels) = 0;
52
49 virtual void resumeWorkerContext() { } 53 virtual void resumeWorkerContext() { }
50 virtual void attachDevTools() { } 54 virtual void attachDevTools() { }
51 virtual void reattachDevTools(const WebString& savedState) { } 55 virtual void reattachDevTools(const WebString& savedState) { }
52 virtual void detachDevTools() { } 56 virtual void detachDevTools() { }
53 virtual void dispatchDevToolsMessage(const WebString&) { } 57 virtual void dispatchDevToolsMessage(const WebString&) { }
54 }; 58 };
55 59
56 } // namespace blink 60 } // namespace blink
57 61
58 #endif // WebServiceWorkerContextProxy_h 62 #endif // WebServiceWorkerContextProxy_h
OLDNEW
« no previous file with comments | « public/platform/WebServiceWorker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698