| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 bool IDBTransaction::hasPendingActivity() const | 294 bool IDBTransaction::hasPendingActivity() const |
| 295 { | 295 { |
| 296 // FIXME: In an ideal world, we should return true as long as anyone has a o
r can | 296 // FIXME: In an ideal world, we should return true as long as anyone has a o
r can |
| 297 // get a handle to us or any child request object and any of those ha
ve | 297 // get a handle to us or any child request object and any of those ha
ve |
| 298 // event listeners. This is in order to handle user generated events
properly. | 298 // event listeners. This is in order to handle user generated events
properly. |
| 299 return m_hasPendingActivity && !m_contextStopped; | 299 return m_hasPendingActivity && !m_contextStopped; |
| 300 } | 300 } |
| 301 | 301 |
| 302 blink::WebIDBTransactionMode IDBTransaction::stringToMode(const String& modeStri
ng, ExceptionState& exceptionState) | 302 blink::WebIDBTransactionMode IDBTransaction::stringToMode(const String& modeStri
ng, ExceptionState& exceptionState) |
| 303 { | 303 { |
| 304 if (modeString.isNull() | 304 if (modeString == IDBTransaction::modeReadOnly()) |
| 305 || modeString == IDBTransaction::modeReadOnly()) | |
| 306 return blink::WebIDBTransactionModeReadOnly; | 305 return blink::WebIDBTransactionModeReadOnly; |
| 307 if (modeString == IDBTransaction::modeReadWrite()) | 306 if (modeString == IDBTransaction::modeReadWrite()) |
| 308 return blink::WebIDBTransactionModeReadWrite; | 307 return blink::WebIDBTransactionModeReadWrite; |
| 309 | 308 |
| 310 exceptionState.throwTypeError("The mode provided ('" + modeString + "') is n
ot one of 'readonly' or 'readwrite'."); | 309 exceptionState.throwTypeError("The mode provided ('" + modeString + "') is n
ot one of 'readonly' or 'readwrite'."); |
| 311 return blink::WebIDBTransactionModeReadOnly; | 310 return blink::WebIDBTransactionModeReadOnly; |
| 312 } | 311 } |
| 313 | 312 |
| 314 const AtomicString& IDBTransaction::modeToString(blink::WebIDBTransactionMode mo
de) | 313 const AtomicString& IDBTransaction::modeToString(blink::WebIDBTransactionMode mo
de) |
| 315 { | 314 { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 event->setTarget(this); | 398 event->setTarget(this); |
| 400 eventQueue->enqueueEvent(event); | 399 eventQueue->enqueueEvent(event); |
| 401 } | 400 } |
| 402 | 401 |
| 403 blink::WebIDBDatabase* IDBTransaction::backendDB() const | 402 blink::WebIDBDatabase* IDBTransaction::backendDB() const |
| 404 { | 403 { |
| 405 return m_database->backend(); | 404 return m_database->backend(); |
| 406 } | 405 } |
| 407 | 406 |
| 408 } // namespace WebCore | 407 } // namespace WebCore |
| OLD | NEW |