| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptU
RL, userAgent, settings, sourceCode, *this, *this, startMode, | 98 RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptU
RL, userAgent, settings, sourceCode, *this, *this, startMode, |
| 99 m_scrip
tExecutionContext->contentSecurityPolicy()->deprecatedHeader(), | 99 m_scrip
tExecutionContext->contentSecurityPolicy()->deprecatedHeader(), |
| 100 m_scrip
tExecutionContext->contentSecurityPolicy()->deprecatedHeaderType()); | 100 m_scrip
tExecutionContext->contentSecurityPolicy()->deprecatedHeaderType()); |
| 101 m_proxy->workerThreadCreated(thread); | 101 m_proxy->workerThreadCreated(thread); |
| 102 thread->start(); | 102 thread->start(); |
| 103 InspectorInstrumentation::didStartWorkerContext(m_scriptExecutionContext.get
(), m_proxy, scriptURL); | 103 InspectorInstrumentation::didStartWorkerContext(m_scriptExecutionContext.get
(), m_proxy, scriptURL); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void WebWorkerClientImpl::terminateWorkerContext() | 106 void WebWorkerClientImpl::terminateWorkerContext() |
| 107 { | 107 { |
| 108 m_webFrame = 0; |
| 108 m_proxy->terminateWorkerContext(); | 109 m_proxy->terminateWorkerContext(); |
| 109 } | 110 } |
| 110 | 111 |
| 111 void WebWorkerClientImpl::postMessageToWorkerContext( | 112 void WebWorkerClientImpl::postMessageToWorkerContext( |
| 112 PassRefPtr<SerializedScriptValue> value, | 113 PassRefPtr<SerializedScriptValue> value, |
| 113 PassOwnPtr<MessagePortChannelArray> ports) | 114 PassOwnPtr<MessagePortChannelArray> ports) |
| 114 { | 115 { |
| 115 m_proxy->postMessageToWorkerContext(value, ports); | 116 m_proxy->postMessageToWorkerContext(value, ports); |
| 116 } | 117 } |
| 117 | 118 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 return false; | 205 return false; |
| 205 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); | 206 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); |
| 206 if (!webView) | 207 if (!webView) |
| 207 return false; | 208 return false; |
| 208 return !webView->permissionClient() || webView->permissionClient()->allowFil
eSystem(m_webFrame); | 209 return !webView->permissionClient() || webView->permissionClient()->allowFil
eSystem(m_webFrame); |
| 209 } | 210 } |
| 210 | 211 |
| 211 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz
e, bool create, | 212 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz
e, bool create, |
| 212 WebFileSystemCallbacks* callbacks) | 213 WebFileSystemCallbacks* callbacks) |
| 213 { | 214 { |
| 214 if (!m_webFrame->client()) { | 215 if (m_proxy->askedToTerminate()) { |
| 215 callbacks->didFail(WebFileErrorAbort); | 216 callbacks->didFail(WebFileErrorAbort); |
| 216 return; | 217 return; |
| 217 } | 218 } |
| 218 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callbac
ks); | 219 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callbac
ks); |
| 219 } | 220 } |
| 220 | 221 |
| 221 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const
WebString& displayName, unsigned long estimatedSize) | 222 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const
WebString& displayName, unsigned long estimatedSize) |
| 222 { | 223 { |
| 223 if (m_proxy->askedToTerminate()) | 224 if (m_proxy->askedToTerminate()) |
| 224 return false; | 225 return false; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 252 { | 253 { |
| 253 } | 254 } |
| 254 | 255 |
| 255 WebWorkerClientImpl::~WebWorkerClientImpl() | 256 WebWorkerClientImpl::~WebWorkerClientImpl() |
| 256 { | 257 { |
| 257 } | 258 } |
| 258 | 259 |
| 259 } // namespace WebKit | 260 } // namespace WebKit |
| 260 | 261 |
| 261 #endif | 262 #endif |
| OLD | NEW |