OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "content/public/browser/browser_message_filter.h" | 10 #include "content/public/browser/browser_message_filter.h" |
11 #include "webkit/browser/database/database_tracker.h" | 11 #include "webkit/browser/database/database_tracker.h" |
12 #include "webkit/common/database/database_connections.h" | 12 #include "webkit/common/database/database_connections.h" |
13 #include "webkit/common/quota/quota_types.h" | 13 #include "webkit/common/quota/quota_types.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class DatabaseMessageFilter | 17 class DatabaseMessageFilter |
18 : public BrowserMessageFilter, | 18 : public BrowserMessageFilter, |
19 public webkit_database::DatabaseTracker::Observer { | 19 public webkit_database::DatabaseTracker::Observer { |
20 public: | 20 public: |
21 explicit DatabaseMessageFilter(webkit_database::DatabaseTracker* db_tracker); | 21 explicit DatabaseMessageFilter(webkit_database::DatabaseTracker* db_tracker); |
22 | 22 |
23 // BrowserMessageFilter implementation. | 23 // BrowserMessageFilter implementation. |
24 virtual void OnChannelClosing() OVERRIDE; | 24 virtual void OnChannelClosing() OVERRIDE; |
25 virtual void OverrideThreadForMessage( | 25 virtual void OverrideThreadForMessage( |
26 const IPC::Message& message, | 26 const IPC::Message& message, |
27 BrowserThread::ID* thread) OVERRIDE; | 27 BrowserThread::ID* thread) OVERRIDE; |
28 virtual bool OnMessageReceived(const IPC::Message& message, | 28 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
29 bool* message_was_ok) OVERRIDE; | |
30 | 29 |
31 webkit_database::DatabaseTracker* database_tracker() const { | 30 webkit_database::DatabaseTracker* database_tracker() const { |
32 return db_tracker_.get(); | 31 return db_tracker_.get(); |
33 } | 32 } |
34 | 33 |
35 private: | 34 private: |
36 virtual ~DatabaseMessageFilter(); | 35 virtual ~DatabaseMessageFilter(); |
37 | 36 |
38 class PromptDelegate; | 37 class PromptDelegate; |
39 | 38 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // to DatabaseTracker. | 92 // to DatabaseTracker. |
94 bool observer_added_; | 93 bool observer_added_; |
95 | 94 |
96 // Keeps track of all DB connections opened by this renderer | 95 // Keeps track of all DB connections opened by this renderer |
97 webkit_database::DatabaseConnections database_connections_; | 96 webkit_database::DatabaseConnections database_connections_; |
98 }; | 97 }; |
99 | 98 |
100 } // namespace content | 99 } // namespace content |
101 | 100 |
102 #endif // CONTENT_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_ | 101 #endif // CONTENT_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_ |
OLD | NEW |