| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Google, Inc. All Rights Reserved. | 3 * Copyright (C) 2011 Google, Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 { | 204 { |
| 205 if (m_scriptExecutionContext->isDocument()) { | 205 if (m_scriptExecutionContext->isDocument()) { |
| 206 Document* document = toDocument(m_scriptExecutionContext); | 206 Document* document = toDocument(m_scriptExecutionContext); |
| 207 return document->page(); | 207 return document->page(); |
| 208 } | 208 } |
| 209 ASSERT(m_scriptExecutionContext->isWorkerContext()); | 209 ASSERT(m_scriptExecutionContext->isWorkerContext()); |
| 210 // allowDatabaseAccess is not yet implemented for workers. | 210 // allowDatabaseAccess is not yet implemented for workers. |
| 211 return true; | 211 return true; |
| 212 } | 212 } |
| 213 | 213 |
| 214 void DatabaseContext::databaseExceededQuota(const String& name, DatabaseDetails
details) | |
| 215 { | |
| 216 if (m_scriptExecutionContext->isDocument()) { | |
| 217 Document* document = toDocument(m_scriptExecutionContext); | |
| 218 if (Page* page = document->page()) | |
| 219 page->chrome()->client()->exceededDatabaseQuota(document->frame(), n
ame, details); | |
| 220 return; | |
| 221 } | |
| 222 ASSERT(m_scriptExecutionContext->isWorkerContext()); | |
| 223 } | |
| 224 | |
| 225 } // namespace WebCore | 214 } // namespace WebCore |
| OLD | NEW |