| 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 initializat
ion. |
| 56 virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCa
cheHostClient*) = 0; | 58 virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCa
cheHostClient*) = 0; |
| 59 virtual WebWorkerPermissionClientProxy* createWorkerPermissionClientProxy(co
nst WebSecurityOrigin&) { return 0; } |
| 57 | 60 |
| 58 virtual void dispatchDevToolsMessage(const WebString&) { } | 61 virtual void dispatchDevToolsMessage(const WebString&) { } |
| 59 virtual void saveDevToolsAgentState(const WebString&) { } | 62 virtual void saveDevToolsAgentState(const WebString&) { } |
| 60 | 63 |
| 61 protected: | 64 protected: |
| 62 ~WebSharedWorkerClient() { } | 65 ~WebSharedWorkerClient() { } |
| 63 }; | 66 }; |
| 64 | 67 |
| 65 } // namespace WebKit | 68 } // namespace WebKit |
| 66 | 69 |
| 67 #endif | 70 #endif |
| OLD | NEW |