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 WEBKIT_SUPPORT_SIMPLE_DOM_STORAGE_SYSTEM_H_ | 5 #ifndef WEBKIT_SUPPORT_SIMPLE_DOM_STORAGE_SYSTEM_H_ |
6 #define WEBKIT_SUPPORT_SIMPLE_DOM_STORAGE_SYSTEM_H_ | 6 #define WEBKIT_SUPPORT_SIMPLE_DOM_STORAGE_SYSTEM_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "webkit/browser/dom_storage/dom_storage_context.h" | 10 #include "webkit/browser/dom_storage/dom_storage_context.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // WebStorageArea interfaces in terms of dom_storage classes. | 42 // WebStorageArea interfaces in terms of dom_storage classes. |
43 class NamespaceImpl; | 43 class NamespaceImpl; |
44 class AreaImpl; | 44 class AreaImpl; |
45 | 45 |
46 // DomStorageContext::EventObserver implementation which | 46 // DomStorageContext::EventObserver implementation which |
47 // calls into webkit/webcore to dispatch events. | 47 // calls into webkit/webcore to dispatch events. |
48 virtual void OnDomStorageItemSet( | 48 virtual void OnDomStorageItemSet( |
49 const dom_storage::DomStorageArea* area, | 49 const dom_storage::DomStorageArea* area, |
50 const base::string16& key, | 50 const base::string16& key, |
51 const base::string16& new_value, | 51 const base::string16& new_value, |
52 const NullableString16& old_value, | 52 const base::NullableString16& old_value, |
53 const GURL& page_url) OVERRIDE; | 53 const GURL& page_url) OVERRIDE; |
54 virtual void OnDomStorageItemRemoved( | 54 virtual void OnDomStorageItemRemoved( |
55 const dom_storage::DomStorageArea* area, | 55 const dom_storage::DomStorageArea* area, |
56 const base::string16& key, | 56 const base::string16& key, |
57 const base::string16& old_value, | 57 const base::string16& old_value, |
58 const GURL& page_url) OVERRIDE; | 58 const GURL& page_url) OVERRIDE; |
59 virtual void OnDomStorageAreaCleared( | 59 virtual void OnDomStorageAreaCleared( |
60 const dom_storage::DomStorageArea* area, | 60 const dom_storage::DomStorageArea* area, |
61 const GURL& page_url) OVERRIDE; | 61 const GURL& page_url) OVERRIDE; |
62 | 62 |
63 void DispatchDomStorageEvent( | 63 void DispatchDomStorageEvent( |
64 const dom_storage::DomStorageArea* area, | 64 const dom_storage::DomStorageArea* area, |
65 const GURL& page_url, | 65 const GURL& page_url, |
66 const NullableString16& key, | 66 const base::NullableString16& key, |
67 const NullableString16& new_value, | 67 const base::NullableString16& new_value, |
68 const NullableString16& old_value); | 68 const base::NullableString16& old_value); |
69 | 69 |
70 base::WeakPtrFactory<SimpleDomStorageSystem> weak_factory_; | 70 base::WeakPtrFactory<SimpleDomStorageSystem> weak_factory_; |
71 scoped_refptr<dom_storage::DomStorageContext> context_; | 71 scoped_refptr<dom_storage::DomStorageContext> context_; |
72 scoped_ptr<dom_storage::DomStorageHost> host_; | 72 scoped_ptr<dom_storage::DomStorageHost> host_; |
73 AreaImpl* area_being_processed_; | 73 AreaImpl* area_being_processed_; |
74 int next_connection_id_; | 74 int next_connection_id_; |
75 | 75 |
76 static SimpleDomStorageSystem* g_instance_; | 76 static SimpleDomStorageSystem* g_instance_; |
77 }; | 77 }; |
78 | 78 |
79 #endif // WEBKIT_SUPPORT_SIMPLE_DOM_STORAGE_SYSTEM_H_ | 79 #endif // WEBKIT_SUPPORT_SIMPLE_DOM_STORAGE_SYSTEM_H_ |
OLD | NEW |