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

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

Issue 8317017: Merge 97546 - [Chromium] Some WebSQLDatabase in worker bug fixes. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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/WebCore/storage/chromium/DatabaseTrackerChromium.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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 void WebWorkerClientImpl::workerContextDestroyed() 183 void WebWorkerClientImpl::workerContextDestroyed()
184 { 184 {
185 m_proxy->workerContextDestroyed(); 185 m_proxy->workerContextDestroyed();
186 } 186 }
187 187
188 bool WebWorkerClientImpl::allowFileSystem() 188 bool WebWorkerClientImpl::allowFileSystem()
189 { 189 {
190 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); 190 WebKit::WebViewImpl* webView = m_webFrame->viewImpl();
191 if (!webView)
192 return false;
191 return !webView->permissionClient() || webView->permissionClient()->allowFil eSystem(m_webFrame); 193 return !webView->permissionClient() || webView->permissionClient()->allowFil eSystem(m_webFrame);
192 } 194 }
193 195
194 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz e, bool create, 196 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz e, bool create,
195 WebFileSystemCallbacks* callbacks) 197 WebFileSystemCallbacks* callbacks)
196 { 198 {
197 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callba cks); 199 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callba cks);
198 } 200 }
199 201
200 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) 202 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize)
201 { 203 {
202 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); 204 WebKit::WebViewImpl* webView = m_webFrame->viewImpl();
203 return !webView->permissionClient() || webView->permissionClient()->allowDa tabase(m_webFrame, name, displayName, estimatedSize); 205 if (!webView)
206 return false;
207 return !webView->permissionClient() || webView->permissionClient()->allowDat abase(m_webFrame, name, displayName, estimatedSize);
204 } 208 }
205 209
206 void WebWorkerClientImpl::dispatchDevToolsMessage(const WebString& message) 210 void WebWorkerClientImpl::dispatchDevToolsMessage(const WebString& message)
207 { 211 {
208 if (m_pageInspector) 212 if (m_pageInspector)
209 m_pageInspector->dispatchMessageFromWorker(message); 213 m_pageInspector->dispatchMessageFromWorker(message);
210 } 214 }
211 215
212 WebView* WebWorkerClientImpl::view() const 216 WebView* WebWorkerClientImpl::view() const
213 { 217 {
214 return m_webFrame->view(); 218 return m_webFrame->view();
215 } 219 }
216 220
217 WebWorkerClientImpl::WebWorkerClientImpl(Worker* worker, WebFrameImpl* webFrame) 221 WebWorkerClientImpl::WebWorkerClientImpl(Worker* worker, WebFrameImpl* webFrame)
218 : m_proxy(new WorkerMessagingProxy(worker)) 222 : m_proxy(new WorkerMessagingProxy(worker))
219 , m_scriptExecutionContext(worker->scriptExecutionContext()) 223 , m_scriptExecutionContext(worker->scriptExecutionContext())
220 , m_webFrame(webFrame) 224 , m_webFrame(webFrame)
221 , m_pageInspector(0) 225 , m_pageInspector(0)
222 226
223 { 227 {
224 } 228 }
225 229
226 WebWorkerClientImpl::~WebWorkerClientImpl() 230 WebWorkerClientImpl::~WebWorkerClientImpl()
227 { 231 {
228 } 232 }
229 233
230 } // namespace WebKit 234 } // namespace WebKit
231 235
232 #endif 236 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/storage/chromium/DatabaseTrackerChromium.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698