| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void clearInspector(); | 87 void clearInspector(); |
| 88 | 88 |
| 89 // FIXME: We can remove this interface when we remove openDatabaseSync. | 89 // FIXME: We can remove this interface when we remove openDatabaseSync. |
| 90 class TerminationObserver { | 90 class TerminationObserver { |
| 91 public: | 91 public: |
| 92 virtual ~TerminationObserver() { } | 92 virtual ~TerminationObserver() { } |
| 93 // The function is probably called in the main thread. | 93 // The function is probably called in the main thread. |
| 94 virtual void wasRequestedToTerminate() = 0; | 94 virtual void wasRequestedToTerminate() = 0; |
| 95 }; | 95 }; |
| 96 void registerTerminationObserver(TerminationObserver*); | 96 void registerTerminationObserver(TerminationObserver*); |
| 97 void unregisterTerminationObserver(TerminationObserver*); | |
| 98 void wasRequestedToTerminate(); | 97 void wasRequestedToTerminate(); |
| 99 | 98 |
| 100 void dispose(); | 99 void dispose(); |
| 101 | 100 |
| 102 WorkerThread* thread() const { return m_thread; } | 101 WorkerThread* thread() const { return m_thread; } |
| 103 | 102 |
| 104 virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE FINAL; // E
xecutes the task on context's thread asynchronously. | 103 virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE FINAL; // E
xecutes the task on context's thread asynchronously. |
| 105 | 104 |
| 106 // WorkerGlobalScope | 105 // WorkerGlobalScope |
| 107 WorkerGlobalScope* self() { return this; } | 106 WorkerGlobalScope* self() { return this; } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 TerminationObserver* m_terminationObserver; | 185 TerminationObserver* m_terminationObserver; |
| 187 | 186 |
| 188 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; | 187 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; |
| 189 }; | 188 }; |
| 190 | 189 |
| 191 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 190 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
| 192 | 191 |
| 193 } // namespace blink | 192 } // namespace blink |
| 194 | 193 |
| 195 #endif // WorkerGlobalScope_h | 194 #endif // WorkerGlobalScope_h |
| OLD | NEW |