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 // context can be distinct. | 46 // context can be distinct. |
47 class WorkerLoaderProxy { | 47 class WorkerLoaderProxy { |
48 public: | 48 public: |
49 virtual ~WorkerLoaderProxy() { } | 49 virtual ~WorkerLoaderProxy() { } |
50 | 50 |
51 // Posts a task to the thread which runs the loading code (normally, the
main thread). | 51 // Posts a task to the thread which runs the loading code (normally, the
main thread). |
52 virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>)
= 0; | 52 virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>)
= 0; |
53 | 53 |
54 // Posts callbacks from loading code to the WorkerContext. The 'mode' is
used to differentiate | 54 // Posts callbacks from loading code to the WorkerContext. The 'mode' is
used to differentiate |
55 // specific synchronous loading requests so they can be 'nested', per sp
ec. | 55 // specific synchronous loading requests so they can be 'nested', per sp
ec. |
56 virtual void postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionCo
ntext::Task>, const String& mode) = 0; | 56 // Returns true if the task was posted successfully. |
| 57 virtual bool postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionCo
ntext::Task>, const String& mode) = 0; |
57 }; | 58 }; |
58 | 59 |
59 } // namespace WebCore | 60 } // namespace WebCore |
60 | 61 |
61 #endif // ENABLE(WORKERS) | 62 #endif // ENABLE(WORKERS) |
62 | 63 |
63 #endif // WorkerLoaderProxy_h | 64 #endif // WorkerLoaderProxy_h |
OLD | NEW |