OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_ |
6 #define CONTENT_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_ | 6 #define CONTENT_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabaseObserver.h
" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabaseObserver.h
" |
12 #include "webkit/database/database_connections.h" | 12 #include "webkit/database/database_connections.h" |
13 | 13 |
14 class WebDatabaseObserverImpl : public WebKit::WebDatabaseObserver { | 14 class WebDatabaseObserverImpl : public WebKit::WebDatabaseObserver { |
15 public: | 15 public: |
16 explicit WebDatabaseObserverImpl(IPC::Message::Sender* sender); | 16 explicit WebDatabaseObserverImpl(IPC::Message::Sender* sender); |
17 virtual ~WebDatabaseObserverImpl(); | 17 virtual ~WebDatabaseObserverImpl(); |
18 | 18 |
19 virtual void databaseOpened(const WebKit::WebDatabase& database); | 19 virtual void databaseOpened(const WebKit::WebDatabase& database) OVERRIDE; |
20 virtual void databaseModified(const WebKit::WebDatabase& database); | 20 virtual void databaseModified(const WebKit::WebDatabase& database) OVERRIDE; |
21 virtual void databaseClosed(const WebKit::WebDatabase& database); | 21 virtual void databaseClosed(const WebKit::WebDatabase& database) OVERRIDE; |
| 22 |
| 23 virtual void reportOpenDatabaseResult( |
| 24 const WebKit::WebDatabase& database, int callsite, |
| 25 int webSqlErrorCode, int sqliteErrorCode) OVERRIDE; |
| 26 virtual void reportChangeVersionResult( |
| 27 const WebKit::WebDatabase& database, int callsite, |
| 28 int webSqlErrorCode, int sqliteErrorCode) OVERRIDE; |
| 29 virtual void reportStartTransactionResult( |
| 30 const WebKit::WebDatabase& database, int callsite, |
| 31 int webSqlErrorCode, int sqliteErrorCode) OVERRIDE; |
| 32 virtual void reportCommitTransactionResult( |
| 33 const WebKit::WebDatabase& database, int callsite, |
| 34 int webSqlErrorCode, int sqliteErrorCode) OVERRIDE; |
| 35 virtual void reportExecuteStatementResult( |
| 36 const WebKit::WebDatabase& database, int callsite, |
| 37 int webSqlErrorCode, int sqliteErrorCode) OVERRIDE; |
| 38 virtual void reportVacuumDatabaseResult( |
| 39 const WebKit::WebDatabase& database, int sqliteErrorCode) OVERRIDE; |
22 | 40 |
23 void WaitForAllDatabasesToClose(); | 41 void WaitForAllDatabasesToClose(); |
24 | 42 |
25 private: | 43 private: |
26 IPC::Message::Sender* sender_; | 44 IPC::Message::Sender* sender_; |
27 scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_; | 45 scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_; |
28 }; | 46 }; |
29 | 47 |
30 #endif // CONTENT_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_ | 48 #endif // CONTENT_COMMON_WEB_DATABASE_OBSERVER_IMPL_H_ |
OLD | NEW |