OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 #include "public/platform/WebString.h" | 36 #include "public/platform/WebString.h" |
37 #include "public/platform/WebURL.h" | 37 #include "public/platform/WebURL.h" |
38 #include "public/platform/WebVector.h" | 38 #include "public/platform/WebVector.h" |
39 #include "public/platform/modules/serviceworker/WebServiceWorkerState.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerState.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 class WebSecurityOrigin; | 43 class WebSecurityOrigin; |
44 class WebServiceWorkerProvider; | 44 class WebServiceWorkerProvider; |
45 class WebServiceWorkerProxy; | 45 class WebServiceWorkerProxy; |
46 typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray; | |
47 | 46 |
48 class WebServiceWorker { | 47 class WebServiceWorker { |
49 public: | 48 public: |
50 // The handle interface that retains a reference to the implementation of | 49 // The handle interface that retains a reference to the implementation of |
51 // WebServiceWorker in the embedder and is owned by ServiceWorker object in | 50 // WebServiceWorker in the embedder and is owned by ServiceWorker object in |
52 // Blink. The embedder must keep the service worker representation while | 51 // Blink. The embedder must keep the service worker representation while |
53 // Blink is owning this handle. | 52 // Blink is owning this handle. |
54 class Handle { | 53 class Handle { |
55 public: | 54 public: |
56 virtual ~Handle() {} | 55 virtual ~Handle() {} |
(...skipping 12 matching lines...) Expand all Loading... |
69 virtual WebURL url() const { return WebURL(); } | 68 virtual WebURL url() const { return WebURL(); } |
70 virtual WebServiceWorkerState state() const { | 69 virtual WebServiceWorkerState state() const { |
71 return WebServiceWorkerStateUnknown; | 70 return WebServiceWorkerStateUnknown; |
72 } | 71 } |
73 | 72 |
74 // Callee receives ownership of the passed vector. | 73 // Callee receives ownership of the passed vector. |
75 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/351753 | 74 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/351753 |
76 virtual void postMessage(WebServiceWorkerProvider*, | 75 virtual void postMessage(WebServiceWorkerProvider*, |
77 const WebString&, | 76 const WebString&, |
78 const WebSecurityOrigin&, | 77 const WebSecurityOrigin&, |
79 WebMessagePortChannelArray*) = 0; | 78 WebMessagePortChannelArray) = 0; |
80 | 79 |
81 virtual void terminate() {} | 80 virtual void terminate() {} |
82 }; | 81 }; |
83 } | 82 } |
84 | 83 |
85 #endif // WebServiceWorker_h | 84 #endif // WebServiceWorker_h |
OLD | NEW |