OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #ifndef WebSharedWorkerClient_h | 31 #ifndef WebSharedWorkerClient_h |
32 #define WebSharedWorkerClient_h | 32 #define WebSharedWorkerClient_h |
33 | 33 |
34 #include "../platform/WebMessagePortChannel.h" | 34 #include "../platform/WebMessagePortChannel.h" |
35 #include "WebCommonWorkerClient.h" | 35 #include "WebCommonWorkerClient.h" |
36 | 36 |
37 namespace WebKit { | 37 namespace WebKit { |
38 | 38 |
39 class WebNotificationPresenter; | 39 class WebNotificationPresenter; |
| 40 class WebSecurityOrigin; |
40 class WebString; | 41 class WebString; |
41 class WebWorker; | 42 class WebWorker; |
| 43 class WebWorkerPermissionClientProxy; |
42 | 44 |
43 // Provides an interface back to the in-page script object for a worker. | 45 // Provides an interface back to the in-page script object for a worker. |
44 // All functions are expected to be called back on the thread that created | 46 // All functions are expected to be called back on the thread that created |
45 // the Worker object, unless noted. | 47 // the Worker object, unless noted. |
46 class WebSharedWorkerClient : public WebCommonWorkerClient { | 48 class WebSharedWorkerClient : public WebCommonWorkerClient { |
47 public: | 49 public: |
48 virtual void workerContextClosed() = 0; | 50 virtual void workerContextClosed() = 0; |
49 virtual void workerContextDestroyed() = 0; | 51 virtual void workerContextDestroyed() = 0; |
50 | 52 |
51 // Returns the notification presenter for this worker context. Pointer | 53 // Returns the notification presenter for this worker context. Pointer |
52 // is owned by the object implementing WebCommonWorkerClient. | 54 // is owned by the object implementing WebCommonWorkerClient. |
53 virtual WebNotificationPresenter* notificationPresenter() = 0; | 55 virtual WebNotificationPresenter* notificationPresenter() = 0; |
54 | 56 |
55 // Called on the main webkit thread in the worker process during initializat
ion. | 57 // Called on the main webkit thread in the worker process during |
| 58 // initialization. |
56 virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCa
cheHostClient*) = 0; | 59 virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCa
cheHostClient*) = 0; |
57 | 60 |
| 61 // Called on the main webkit thread in the worker process during |
| 62 // initialization. |
| 63 // WebWorkerPermissionClientProxy should not retain the given |
| 64 // WebSecurityOrigin, as the proxy instance is passed to worker thread |
| 65 // while WebSecurityOrigin is not thread safe. |
| 66 virtual WebWorkerPermissionClientProxy* createWorkerPermissionClientProxy(co
nst WebSecurityOrigin&) { return 0; } |
| 67 |
58 virtual void dispatchDevToolsMessage(const WebString&) { } | 68 virtual void dispatchDevToolsMessage(const WebString&) { } |
59 virtual void saveDevToolsAgentState(const WebString&) { } | 69 virtual void saveDevToolsAgentState(const WebString&) { } |
60 | 70 |
61 protected: | 71 protected: |
62 ~WebSharedWorkerClient() { } | 72 ~WebSharedWorkerClient() { } |
63 }; | 73 }; |
64 | 74 |
65 } // namespace WebKit | 75 } // namespace WebKit |
66 | 76 |
67 #endif | 77 #endif |
OLD | NEW |