| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // It can't use it directly since it uses WebKit types, so this class converts the data types. | 45 // It can't use it directly since it uses WebKit types, so this class converts the data types. |
| 46 // When the WebCore::SharedWorker object wants to call WebCore::WorkerReportingProxy, this class will | 46 // When the WebCore::SharedWorker object wants to call WebCore::WorkerReportingProxy, this class will |
| 47 // convert to Chrome data types first and then call the supplied WebCommonWorkerClient. | 47 // convert to Chrome data types first and then call the supplied WebCommonWorkerClient. |
| 48 class WebSharedWorkerImpl : public WebWorkerBase, public WebSharedWorker { | 48 class WebSharedWorkerImpl : public WebWorkerBase, public WebSharedWorker { |
| 49 public: | 49 public: |
| 50 explicit WebSharedWorkerImpl(WebCommonWorkerClient* client); | 50 explicit WebSharedWorkerImpl(WebCommonWorkerClient* client); |
| 51 | 51 |
| 52 // WebSharedWorker methods: | 52 // WebSharedWorker methods: |
| 53 virtual bool isStarted(); | 53 virtual bool isStarted(); |
| 54 virtual void startWorkerContext(const WebURL&, const WebString& name, const WebString& userAgent, const WebString& sourceCode); | 54 virtual void startWorkerContext(const WebURL&, const WebString& name, const WebString& userAgent, const WebString& sourceCode); |
| 55 virtual void connect(WebMessagePortChannel*); | 55 virtual void connect(WebMessagePortChannel*, ConnectListener*); |
| 56 virtual void terminateWorkerContext(); | 56 virtual void terminateWorkerContext(); |
| 57 virtual void clientDestroyed(); | 57 virtual void clientDestroyed(); |
| 58 | 58 |
| 59 // WebWorkerBase methods: | 59 // WebWorkerBase methods: |
| 60 WebWorkerClient* client(); | 60 WebWorkerClient* client(); |
| 61 WebCommonWorkerClient* commonClient() { return m_client; } | 61 WebCommonWorkerClient* commonClient() { return m_client; } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 virtual ~WebSharedWorkerImpl(); | 64 virtual ~WebSharedWorkerImpl(); |
| 65 | 65 |
| 66 static void connectTask(WebCore::ScriptExecutionContext*, WebSharedWorkerImpl*, PassOwnPtr<WebCore::MessagePortChannel>); | 66 static void connectTask(WebCore::ScriptExecutionContext*, WebSharedWorkerImpl*, PassOwnPtr<WebCore::MessagePortChannel>); |
| 67 | 67 |
| 68 WebCommonWorkerClient* m_client; | 68 WebCommonWorkerClient* m_client; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace WebKit | 71 } // namespace WebKit |
| 72 | 72 |
| 73 #endif // ENABLE(SHARED_WORKERS) | 73 #endif // ENABLE(SHARED_WORKERS) |
| 74 | 74 |
| 75 #endif | 75 #endif |
| OLD | NEW |