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_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_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 "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual void OnFilterRemoved() OVERRIDE; | 42 virtual void OnFilterRemoved() OVERRIDE; |
43 virtual base::TaskRunner* OverrideTaskRunnerForMessage( | 43 virtual base::TaskRunner* OverrideTaskRunnerForMessage( |
44 const IPC::Message& message) OVERRIDE; | 44 const IPC::Message& message) OVERRIDE; |
45 virtual bool OnMessageReceived(const IPC::Message& message, | 45 virtual bool OnMessageReceived(const IPC::Message& message, |
46 bool* message_was_ok) OVERRIDE; | 46 bool* message_was_ok) OVERRIDE; |
47 | 47 |
48 // Message Handlers. | 48 // Message Handlers. |
49 void OnOpenStorageArea(int connection_id, int64 namespace_id, | 49 void OnOpenStorageArea(int connection_id, int64 namespace_id, |
50 const GURL& origin); | 50 const GURL& origin); |
51 void OnCloseStorageArea(int connection_id); | 51 void OnCloseStorageArea(int connection_id); |
| 52 void OnLoadStorageArea(int connection_id, dom_storage::ValuesMap* map); |
52 void OnLength(int connection_id, unsigned* length); | 53 void OnLength(int connection_id, unsigned* length); |
53 void OnKey(int connection_id, unsigned index, NullableString16* key); | 54 void OnKey(int connection_id, unsigned index, NullableString16* key); |
54 void OnGetItem(int connection_id, const string16& key, | 55 void OnGetItem(int connection_id, const string16& key, |
55 NullableString16* value); | 56 NullableString16* value); |
56 void OnSetItem(int connection_id, const string16& key, | 57 void OnSetItem(int connection_id, const string16& key, |
57 const string16& value, const GURL& url, | 58 const string16& value, const GURL& page_url, |
58 WebKit::WebStorageArea::Result* result, | 59 WebKit::WebStorageArea::Result* result, |
59 NullableString16* old_value); | 60 NullableString16* old_value); |
| 61 void OnSetItemAsync(int connection_id, int operation_id, const string16& key, |
| 62 const string16& value, const GURL& page_url); |
| 63 |
60 void OnRemoveItem(int connection_id, const string16& key, | 64 void OnRemoveItem(int connection_id, const string16& key, |
61 const GURL& url, NullableString16* old_value); | 65 const GURL& page_url, NullableString16* old_value); |
| 66 void OnRemoveItemAsync(int connection_id, int operation_id, |
| 67 const string16& key, const GURL& page_url); |
62 void OnClear(int connection_id, const GURL& url, bool* something_cleared); | 68 void OnClear(int connection_id, const GURL& url, bool* something_cleared); |
| 69 void OnClearAsync(int connection_id, int operation_id, const GURL& page_url); |
63 | 70 |
64 // DomStorageContext::EventObserver implementation which | 71 // DomStorageContext::EventObserver implementation which |
65 // sends events back to our renderer process. | 72 // sends events back to our renderer process. |
66 virtual void OnDomStorageItemSet( | 73 virtual void OnDomStorageItemSet( |
67 const dom_storage::DomStorageArea* area, | 74 const dom_storage::DomStorageArea* area, |
68 const string16& key, | 75 const string16& key, |
69 const string16& new_value, | 76 const string16& new_value, |
70 const NullableString16& old_value, | 77 const NullableString16& old_value, |
71 const GURL& page_url) OVERRIDE; | 78 const GURL& page_url) OVERRIDE; |
72 virtual void OnDomStorageItemRemoved( | 79 virtual void OnDomStorageItemRemoved( |
(...skipping 13 matching lines...) Expand all Loading... |
86 const NullableString16& old_value); | 93 const NullableString16& old_value); |
87 | 94 |
88 scoped_refptr<dom_storage::DomStorageContext> context_; | 95 scoped_refptr<dom_storage::DomStorageContext> context_; |
89 scoped_ptr<dom_storage::DomStorageHost> host_; | 96 scoped_ptr<dom_storage::DomStorageHost> host_; |
90 int connection_dispatching_message_for_; | 97 int connection_dispatching_message_for_; |
91 | 98 |
92 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageMessageFilter); | 99 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageMessageFilter); |
93 }; | 100 }; |
94 | 101 |
95 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ | 102 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ |
OLD | NEW |