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 23 matching lines...) Expand all Loading... |
34 #include "modules/webdatabase/SQLCallbackWrapper.h" | 34 #include "modules/webdatabase/SQLCallbackWrapper.h" |
35 #include "modules/webdatabase/SQLStatement.h" | 35 #include "modules/webdatabase/SQLStatement.h" |
36 #include "modules/webdatabase/SQLTransactionStateMachine.h" | 36 #include "modules/webdatabase/SQLTransactionStateMachine.h" |
37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class AbstractSQLTransactionBackend; | 42 class AbstractSQLTransactionBackend; |
43 class Database; | 43 class Database; |
44 class ExceptionState; | |
45 class SQLError; | 44 class SQLError; |
46 class SQLStatementCallback; | 45 class SQLStatementCallback; |
47 class SQLStatementErrorCallback; | 46 class SQLStatementErrorCallback; |
48 class SQLTransactionCallback; | 47 class SQLTransactionCallback; |
49 class SQLTransactionErrorCallback; | 48 class SQLTransactionErrorCallback; |
50 class SQLValue; | 49 class SQLValue; |
51 class VoidCallback; | 50 class VoidCallback; |
52 | 51 |
53 class SQLTransaction : public SQLTransactionStateMachine<SQLTransaction>, public
AbstractSQLTransaction, public ScriptWrappable { | 52 class SQLTransaction : public SQLTransactionStateMachine<SQLTransaction>, public
AbstractSQLTransaction, public ScriptWrappable { |
54 public: | 53 public: |
55 static PassRefPtr<SQLTransaction> create(Database*, PassRefPtr<SQLTransactio
nCallback>, | 54 static PassRefPtr<SQLTransaction> create(Database*, PassRefPtr<SQLTransactio
nCallback>, |
56 PassRefPtr<VoidCallback> successCallback, PassRefPtr<SQLTransactionError
Callback>, | 55 PassRefPtr<VoidCallback> successCallback, PassRefPtr<SQLTransactionError
Callback>, |
57 bool readOnly); | 56 bool readOnly); |
58 | 57 |
59 void performPendingCallback(); | 58 void performPendingCallback(); |
60 | 59 |
61 void executeSQL(const String& sqlStatement, const Vector<SQLValue>& argument
s, | 60 void executeSQL(const String& sqlStatement, const Vector<SQLValue>& argument
s, |
62 PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>,
ExceptionState&); | 61 PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>,
ExceptionCode&); |
63 | 62 |
64 Database* database() { return m_database.get(); } | 63 Database* database() { return m_database.get(); } |
65 | 64 |
66 private: | 65 private: |
67 SQLTransaction(Database*, PassRefPtr<SQLTransactionCallback>, | 66 SQLTransaction(Database*, PassRefPtr<SQLTransactionCallback>, |
68 PassRefPtr<VoidCallback> successCallback, PassRefPtr<SQLTransactionError
Callback>, | 67 PassRefPtr<VoidCallback> successCallback, PassRefPtr<SQLTransactionError
Callback>, |
69 bool readOnly); | 68 bool readOnly); |
70 | 69 |
71 void clearCallbackWrappers(); | 70 void clearCallbackWrappers(); |
72 | 71 |
(...skipping 28 matching lines...) Expand all Loading... |
101 | 100 |
102 bool m_executeSqlAllowed; | 101 bool m_executeSqlAllowed; |
103 RefPtr<SQLError> m_transactionError; | 102 RefPtr<SQLError> m_transactionError; |
104 | 103 |
105 bool m_readOnly; | 104 bool m_readOnly; |
106 }; | 105 }; |
107 | 106 |
108 } // namespace WebCore | 107 } // namespace WebCore |
109 | 108 |
110 #endif // SQLTransaction_h | 109 #endif // SQLTransaction_h |
OLD | NEW |