| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2013 Apple 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 class Database; | 39 class Database; |
| 40 class ExceptionState; | 40 class ExceptionState; |
| 41 class SQLErrorData; | 41 class SQLErrorData; |
| 42 class SQLStatementCallback; | 42 class SQLStatementCallback; |
| 43 class SQLStatementErrorCallback; | 43 class SQLStatementErrorCallback; |
| 44 class SQLTransactionBackend; | 44 class SQLTransactionBackend; |
| 45 class SQLTransactionCallback; | 45 class SQLTransactionCallback; |
| 46 class SQLTransactionErrorCallback; | 46 class SQLTransactionErrorCallback; |
| 47 class SQLValue; | 47 class SQLValue; |
| 48 class ScriptValue; |
| 48 class VoidCallback; | 49 class VoidCallback; |
| 49 | 50 |
| 50 class SQLTransaction final | 51 class SQLTransaction final |
| 51 : public GarbageCollectedFinalized<SQLTransaction> | 52 : public GarbageCollectedFinalized<SQLTransaction> |
| 52 , public SQLTransactionStateMachine<SQLTransaction> | 53 , public SQLTransactionStateMachine<SQLTransaction> |
| 53 , public ScriptWrappable { | 54 , public ScriptWrappable { |
| 54 DEFINE_WRAPPERTYPEINFO(); | 55 DEFINE_WRAPPERTYPEINFO(); |
| 55 public: | 56 public: |
| 56 static SQLTransaction* create(Database*, SQLTransactionCallback*, | 57 static SQLTransaction* create(Database*, SQLTransactionCallback*, |
| 57 VoidCallback* successCallback, SQLTransactionErrorCallback*, bool readOn
ly); | 58 VoidCallback* successCallback, SQLTransactionErrorCallback*, bool readOn
ly); |
| 58 ~SQLTransaction(); | 59 ~SQLTransaction(); |
| 59 DECLARE_TRACE(); | 60 DECLARE_TRACE(); |
| 60 | 61 |
| 61 void performPendingCallback(); | 62 void performPendingCallback(); |
| 62 | 63 |
| 63 void executeSQL(const String& sqlStatement, const Vector<SQLValue>& argument
s, | 64 void executeSql(const String& sqlStatement, const Vector<ScriptValue>& argum
ents, |
| 64 SQLStatementCallback*, SQLStatementErrorCallback*, ExceptionState&); | 65 SQLStatementCallback*, SQLStatementErrorCallback*, ExceptionState&); |
| 66 void executeSql(const String& sqlStatement, ExceptionState&); |
| 65 | 67 |
| 66 Database* database() { return m_database.get(); } | 68 Database* database() { return m_database.get(); } |
| 67 | 69 |
| 68 SQLTransactionErrorCallback* releaseErrorCallback(); | 70 SQLTransactionErrorCallback* releaseErrorCallback(); |
| 69 | 71 |
| 70 // APIs called from the backend published: | 72 // APIs called from the backend published: |
| 71 void requestTransitToState(SQLTransactionState); | 73 void requestTransitToState(SQLTransactionState); |
| 72 bool hasCallback() const; | 74 bool hasCallback() const; |
| 73 bool hasSuccessCallback() const; | 75 bool hasSuccessCallback() const; |
| 74 bool hasErrorCallback() const; | 76 bool hasErrorCallback() const; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 bool m_executeSqlAllowed; | 108 bool m_executeSqlAllowed; |
| 107 OwnPtr<SQLErrorData> m_transactionError; | 109 OwnPtr<SQLErrorData> m_transactionError; |
| 108 | 110 |
| 109 bool m_readOnly; | 111 bool m_readOnly; |
| 110 int m_asyncOperationId; | 112 int m_asyncOperationId; |
| 111 }; | 113 }; |
| 112 | 114 |
| 113 } // namespace blink | 115 } // namespace blink |
| 114 | 116 |
| 115 #endif // SQLTransaction_h | 117 #endif // SQLTransaction_h |
| OLD | NEW |