OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHILD_WEB_DATABASE_OBSERVER_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEB_DATABASE_OBSERVER_IMPL_H_ |
6 #define CONTENT_CHILD_WEB_DATABASE_OBSERVER_IMPL_H_ | 6 #define CONTENT_CHILD_WEB_DATABASE_OBSERVER_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "ipc/ipc_sync_message_filter.h" | 9 #include "ipc/ipc_sync_message_filter.h" |
10 #include "third_party/WebKit/public/web/WebDatabaseObserver.h" | 10 #include "third_party/WebKit/public/web/WebDatabaseObserver.h" |
11 #include "webkit/common/database/database_connections.h" | 11 #include "webkit/common/database/database_connections.h" |
12 | 12 |
| 13 namespace WebKit { |
| 14 class WebString; |
| 15 } |
| 16 |
13 namespace content { | 17 namespace content { |
14 | 18 |
15 class WebDatabaseObserverImpl : public WebKit::WebDatabaseObserver { | 19 class WebDatabaseObserverImpl : public WebKit::WebDatabaseObserver { |
16 public: | 20 public: |
17 explicit WebDatabaseObserverImpl(IPC::SyncMessageFilter* sender); | 21 explicit WebDatabaseObserverImpl(IPC::SyncMessageFilter* sender); |
18 virtual ~WebDatabaseObserverImpl(); | 22 virtual ~WebDatabaseObserverImpl(); |
19 | 23 |
20 virtual void databaseOpened(const WebKit::WebDatabase& database) OVERRIDE; | 24 virtual void databaseOpened(const WebKit::WebDatabase& database) OVERRIDE; |
21 virtual void databaseModified(const WebKit::WebDatabase& database) OVERRIDE; | 25 virtual void databaseModified(const WebKit::WebDatabase& database) OVERRIDE; |
22 virtual void databaseClosed(const WebKit::WebDatabase& database) OVERRIDE; | 26 virtual void databaseClosed(const WebKit::WebString& origin_identifier, |
| 27 const WebKit::WebString& database_name); |
| 28 // TODO(jochen): Remove this version once the blink side has rolled. |
| 29 virtual void databaseClosed(const WebKit::WebDatabase& database); |
23 | 30 |
24 virtual void reportOpenDatabaseResult( | 31 virtual void reportOpenDatabaseResult( |
25 const WebKit::WebDatabase& database, int callsite, | 32 const WebKit::WebDatabase& database, int callsite, |
26 int websql_error, int sqlite_error) OVERRIDE; | 33 int websql_error, int sqlite_error) OVERRIDE; |
27 virtual void reportChangeVersionResult( | 34 virtual void reportChangeVersionResult( |
28 const WebKit::WebDatabase& database, int callsite, | 35 const WebKit::WebDatabase& database, int callsite, |
29 int websql_error, int sqlite_error) OVERRIDE; | 36 int websql_error, int sqlite_error) OVERRIDE; |
30 virtual void reportStartTransactionResult( | 37 virtual void reportStartTransactionResult( |
31 const WebKit::WebDatabase& database, int callsite, | 38 const WebKit::WebDatabase& database, int callsite, |
32 int websql_error, int sqlite_error) OVERRIDE; | 39 int websql_error, int sqlite_error) OVERRIDE; |
(...skipping 11 matching lines...) Expand all Loading... |
44 private: | 51 private: |
45 void HandleSqliteError(const WebKit::WebDatabase& database, int error); | 52 void HandleSqliteError(const WebKit::WebDatabase& database, int error); |
46 | 53 |
47 scoped_refptr<IPC::SyncMessageFilter> sender_; | 54 scoped_refptr<IPC::SyncMessageFilter> sender_; |
48 scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_; | 55 scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_; |
49 }; | 56 }; |
50 | 57 |
51 } // namespace content | 58 } // namespace content |
52 | 59 |
53 #endif // CONTENT_CHILD_WEB_DATABASE_OBSERVER_IMPL_H_ | 60 #endif // CONTENT_CHILD_WEB_DATABASE_OBSERVER_IMPL_H_ |
OLD | NEW |