| 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 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 class AbstractSQLStatementBackend; | 41 class AbstractSQLStatementBackend; |
| 42 class Database; | 42 class Database; |
| 43 class SQLError; | 43 class SQLError; |
| 44 class SQLStatementCallback; | 44 class SQLStatementCallback; |
| 45 class SQLStatementErrorCallback; | 45 class SQLStatementErrorCallback; |
| 46 class SQLTransaction; | 46 class SQLTransaction; |
| 47 | 47 |
| 48 class SQLStatement : public AbstractSQLStatement { | 48 class SQLStatement FINAL : public AbstractSQLStatement { |
| 49 public: | 49 public: |
| 50 static PassOwnPtr<SQLStatement> create(Database*, | 50 static PassOwnPtr<SQLStatement> create(Database*, |
| 51 PassOwnPtr<SQLStatementCallback>, PassOwnPtr<SQLStatementErrorCallback>)
; | 51 PassOwnPtr<SQLStatementCallback>, PassOwnPtr<SQLStatementErrorCallback>)
; |
| 52 | 52 |
| 53 bool performCallback(SQLTransaction*); | 53 bool performCallback(SQLTransaction*); |
| 54 | 54 |
| 55 virtual void setBackend(AbstractSQLStatementBackend*); | 55 virtual void setBackend(AbstractSQLStatementBackend*) OVERRIDE; |
| 56 | 56 |
| 57 virtual bool hasCallback(); | 57 virtual bool hasCallback() OVERRIDE; |
| 58 virtual bool hasErrorCallback(); | 58 virtual bool hasErrorCallback() OVERRIDE; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 SQLStatement(Database*, PassOwnPtr<SQLStatementCallback>, PassOwnPtr<SQLStat
ementErrorCallback>); | 61 SQLStatement(Database*, PassOwnPtr<SQLStatementCallback>, PassOwnPtr<SQLStat
ementErrorCallback>); |
| 62 | 62 |
| 63 // The AbstractSQLStatementBackend owns the SQLStatement. Hence, the backend
is | 63 // The AbstractSQLStatementBackend owns the SQLStatement. Hence, the backend
is |
| 64 // guaranteed to be outlive the SQLStatement, and it is safe for us to refer | 64 // guaranteed to be outlive the SQLStatement, and it is safe for us to refer |
| 65 // to the backend using a raw pointer here. | 65 // to the backend using a raw pointer here. |
| 66 AbstractSQLStatementBackend* m_backend; | 66 AbstractSQLStatementBackend* m_backend; |
| 67 | 67 |
| 68 SQLCallbackWrapper<SQLStatementCallback> m_statementCallbackWrapper; | 68 SQLCallbackWrapper<SQLStatementCallback> m_statementCallbackWrapper; |
| 69 SQLCallbackWrapper<SQLStatementErrorCallback> m_statementErrorCallbackWrappe
r; | 69 SQLCallbackWrapper<SQLStatementErrorCallback> m_statementErrorCallbackWrappe
r; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace WebCore | 72 } // namespace WebCore |
| 73 | 73 |
| 74 #endif // SQLStatement_h | 74 #endif // SQLStatement_h |
| OLD | NEW |