Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/WebKit/chromium/src/WebWorkerClientImpl.cpp

Issue 9383008: Merge 107174 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void WebWorkerClientImpl::postConsoleMessageToWorkerObject(MessageSource source, MessageType type, MessageLevel level, const String& message, int lineNumber, co nst String& sourceURL) 180 void WebWorkerClientImpl::postConsoleMessageToWorkerObject(MessageSource source, MessageType type, MessageLevel level, const String& message, int lineNumber, co nst String& sourceURL)
181 { 181 {
182 m_proxy->postConsoleMessageToWorkerObject(source, type, level, message, line Number, sourceURL); 182 m_proxy->postConsoleMessageToWorkerObject(source, type, level, message, line Number, sourceURL);
183 } 183 }
184 184
185 void WebWorkerClientImpl::workerContextDestroyed() 185 void WebWorkerClientImpl::workerContextDestroyed()
186 { 186 {
187 m_proxy->workerContextDestroyed(); 187 m_proxy->workerContextDestroyed();
188 } 188 }
189 189
190 bool WebWorkerClientImpl::allowFileSystem() 190 bool WebWorkerClientImpl::allowFileSystem()
191 { 191 {
192 if (m_proxy->askedToTerminate())
193 return false;
192 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); 194 WebKit::WebViewImpl* webView = m_webFrame->viewImpl();
193 if (!webView) 195 if (!webView)
194 return false; 196 return false;
195 return !webView->permissionClient() || webView->permissionClient()->allowFil eSystem(m_webFrame); 197 return !webView->permissionClient() || webView->permissionClient()->allowFil eSystem(m_webFrame);
196 } 198 }
197 199
198 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz e, bool create, 200 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz e, bool create,
199 WebFileSystemCallbacks* callbacks) 201 WebFileSystemCallbacks* callbacks)
200 { 202 {
201 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callba cks); 203 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callba cks);
202 } 204 }
203 205
204 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) 206 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize)
205 { 207 {
208 if (m_proxy->askedToTerminate())
209 return false;
206 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); 210 WebKit::WebViewImpl* webView = m_webFrame->viewImpl();
207 if (!webView) 211 if (!webView)
208 return false; 212 return false;
209 return !webView->permissionClient() || webView->permissionClient()->allowDat abase(m_webFrame, name, displayName, estimatedSize); 213 return !webView->permissionClient() || webView->permissionClient()->allowDat abase(m_webFrame, name, displayName, estimatedSize);
210 } 214 }
211 215
212 WebView* WebWorkerClientImpl::view() const 216 WebView* WebWorkerClientImpl::view() const
213 { 217 {
218 if (m_proxy->askedToTerminate())
219 return 0;
214 return m_webFrame->view(); 220 return m_webFrame->view();
215 } 221 }
216 222
217 WebWorkerClientImpl::WebWorkerClientImpl(Worker* worker, WebFrameImpl* webFrame) 223 WebWorkerClientImpl::WebWorkerClientImpl(Worker* worker, WebFrameImpl* webFrame)
218 : m_proxy(new WorkerMessagingProxy(worker)) 224 : m_proxy(new WorkerMessagingProxy(worker))
219 , m_scriptExecutionContext(worker->scriptExecutionContext()) 225 , m_scriptExecutionContext(worker->scriptExecutionContext())
220 , m_webFrame(webFrame) 226 , m_webFrame(webFrame)
221 { 227 {
222 } 228 }
223 229
224 WebWorkerClientImpl::~WebWorkerClientImpl() 230 WebWorkerClientImpl::~WebWorkerClientImpl()
225 { 231 {
226 } 232 }
227 233
228 } // namespace WebKit 234 } // namespace WebKit
229 235
230 #endif 236 #endif
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698