Index: content/renderer/dom_storage/dom_storage_dispatcher.h |
=================================================================== |
--- content/renderer/dom_storage/dom_storage_dispatcher.h (revision 138129) |
+++ content/renderer/dom_storage/dom_storage_dispatcher.h (working copy) |
@@ -6,24 +6,44 @@ |
#define CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_DISPATCHER_H_ |
#pragma once |
+#include "base/memory/ref_counted.h" |
#include "ipc/ipc_channel.h" |
+class GURL; |
struct DOMStorageMsg_Event_Params; |
+namespace dom_storage { |
+class DomStorageCachedArea; |
+class DomStorageProxy; |
+} |
+ |
// Dispatches DomStorage related messages sent to a renderer process from the |
// main browser process. There is one instance per child process. Messages |
// are dispatched on the main renderer thread. The RenderThreadImpl |
-// creates an instance and delegates calls to it. |
+// creates an instance and delegates calls to it. This classes also manages |
+// the collection of DomStorageCachedAreas that are active in the process. |
class DomStorageDispatcher : public IPC::Channel::Listener { |
public: |
- DomStorageDispatcher() {} |
+ DomStorageDispatcher(); |
+ virtual ~DomStorageDispatcher(); |
+ // Each call to open should be balanced with a call to close. |
+ scoped_refptr<dom_storage::DomStorageCachedArea> OpenCachedArea( |
+ int connection_id, int64 namespace_id, const GURL& origin); |
+ void CloseCachedArea( |
+ int connection_id, dom_storage::DomStorageCachedArea* area); |
+ |
// IPC::Channel::Listener implementation |
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
private: |
+ class ProxyImpl; |
+ |
// IPC message handlers |
void OnStorageEvent(const DOMStorageMsg_Event_Params& params); |
+ void OnAsyncOperationComplete(bool success); |
+ |
+ scoped_refptr<ProxyImpl> proxy_; |
}; |
#endif // CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_DISPATCHER_H_ |