| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // communications to the Document context and back to the worker. | 46 // communications to the Document context and back to the worker. |
| 47 // Note that in multi-process browsers, the Worker object context and the Do
cument | 47 // Note that in multi-process browsers, the Worker object context and the Do
cument |
| 48 // context can be distinct. | 48 // context can be distinct. |
| 49 class WorkerLoaderProxy { | 49 class WorkerLoaderProxy { |
| 50 public: | 50 public: |
| 51 virtual ~WorkerLoaderProxy() { } | 51 virtual ~WorkerLoaderProxy() { } |
| 52 | 52 |
| 53 // Posts a task to the thread which runs the loading code (normally, the
main thread). | 53 // Posts a task to the thread which runs the loading code (normally, the
main thread). |
| 54 virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>)
= 0; | 54 virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>)
= 0; |
| 55 | 55 |
| 56 // Posts callbacks from loading code to the WorkerContext. The 'mode' is
used to differentiate | 56 // Posts callbacks from loading code to the WorkerGlobalScope. The 'mode
' is used to differentiate |
| 57 // specific synchronous loading requests so they can be 'nested', per sp
ec. | 57 // specific synchronous loading requests so they can be 'nested', per sp
ec. |
| 58 // Returns true if the task was posted successfully. | 58 // Returns true if the task was posted successfully. |
| 59 virtual bool postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionCo
ntext::Task>, const String& mode) = 0; | 59 virtual bool postTaskForModeToWorkerGlobalScope(PassOwnPtr<ScriptExecuti
onContext::Task>, const String& mode) = 0; |
| 60 | 60 |
| 61 // Spans divergent class hierarchies for dedicated and shared workers. | 61 // Spans divergent class hierarchies for dedicated and shared workers. |
| 62 virtual WebKit::WebWorkerBase* toWebWorkerBase() = 0; | 62 virtual WebKit::WebWorkerBase* toWebWorkerBase() = 0; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace WebCore | 65 } // namespace WebCore |
| 66 | 66 |
| 67 #endif // WorkerLoaderProxy_h | 67 #endif // WorkerLoaderProxy_h |
| OLD | NEW |