| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_WORKER_TEST_WEBWORKER_H_ | 5 #ifndef CHROME_TEST_WORKER_TEST_WEBWORKER_H_ |
| 6 #define CHROME_TEST_WORKER_TEST_WEBWORKER_H_ | 6 #define CHROME_TEST_WORKER_TEST_WEBWORKER_H_ |
| 7 | 7 |
| 8 #if ENABLE(WORKERS) | 8 #if ENABLE(WORKERS) |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // WebWorkerClient methods: | 35 // WebWorkerClient methods: |
| 36 virtual void postMessageToWorkerObject(const WebKit::WebString& message); | 36 virtual void postMessageToWorkerObject(const WebKit::WebString& message); |
| 37 virtual void postExceptionToWorkerObject( | 37 virtual void postExceptionToWorkerObject( |
| 38 const WebKit::WebString& error_message, | 38 const WebKit::WebString& error_message, |
| 39 int line_number, | 39 int line_number, |
| 40 const WebKit::WebString& source_url); | 40 const WebKit::WebString& source_url); |
| 41 virtual void postConsoleMessageToWorkerObject( | 41 virtual void postConsoleMessageToWorkerObject( |
| 42 int destination_id, | 42 int destination_id, |
| 43 int source_id, | 43 int source_id, |
| 44 int message_type, |
| 44 int message_level, | 45 int message_level, |
| 45 const WebKit::WebString& message, | 46 const WebKit::WebString& message, |
| 46 int line_number, | 47 int line_number, |
| 47 const WebKit::WebString& source_url); | 48 const WebKit::WebString& source_url); |
| 48 virtual void confirmMessageFromWorkerObject(bool has_pending_activity); | 49 virtual void confirmMessageFromWorkerObject(bool has_pending_activity); |
| 49 virtual void reportPendingActivity(bool has_pending_activity); | 50 virtual void reportPendingActivity(bool has_pending_activity); |
| 50 virtual void workerContextDestroyed(); | 51 virtual void workerContextDestroyed(); |
| 51 virtual WebKit::WebWorker* createWorker(WebKit::WebWorkerClient* client) { | 52 virtual WebKit::WebWorker* createWorker(WebKit::WebWorkerClient* client) { |
| 52 return NULL; | 53 return NULL; |
| 53 } | 54 } |
| 54 | 55 |
| 55 private: | 56 private: |
| 56 friend class base::RefCounted<TestWebWorker>; | 57 friend class base::RefCounted<TestWebWorker>; |
| 57 virtual ~TestWebWorker(); | 58 virtual ~TestWebWorker(); |
| 58 | 59 |
| 59 static void InvokeMainThreadMethod(void* param); | 60 static void InvokeMainThreadMethod(void* param); |
| 60 | 61 |
| 61 WebKit::WebWorkerClient* webworkerclient_delegate_; | 62 WebKit::WebWorkerClient* webworkerclient_delegate_; |
| 62 WebKit::WebWorker* webworker_impl_; | 63 WebKit::WebWorker* webworker_impl_; |
| 63 TestWebWorkerHelper* webworker_helper_; | 64 TestWebWorkerHelper* webworker_helper_; |
| 64 std::vector<string16> queued_messages_; | 65 std::vector<string16> queued_messages_; |
| 65 | 66 |
| 66 DISALLOW_COPY_AND_ASSIGN(TestWebWorker); | 67 DISALLOW_COPY_AND_ASSIGN(TestWebWorker); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 #endif | 70 #endif |
| 70 | 71 |
| 71 #endif // CHROME_TEST_WORKER_TEST_WEBWORKER_H_ | 72 #endif // CHROME_TEST_WORKER_TEST_WEBWORKER_H_ |
| OLD | NEW |