#ifndef CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_DISPATCHER_H_
#define CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_DISPATCHER_H_
#include "base/memory/ref_counted.h"
class GURL;
struct DOMStorageMsg_Event_Params;
namespace IPC {
class Message;
}
namespace content {
class DOMStorageCachedArea;
class DomStorageDispatcher {
public:
DomStorageDispatcher();
~DomStorageDispatcher();
scoped_refptr<DOMStorageCachedArea> OpenCachedArea(int connection_id,
int64 namespace_id,
const GURL& origin);
void CloseCachedArea(int connection_id, DOMStorageCachedArea* area);
bool OnMessageReceived(const IPC::Message& msg);
private:
class ProxyImpl;
void OnStorageEvent(const DOMStorageMsg_Event_Params& params);
void OnAsyncOperationComplete(bool success);
void OnResetCachedValues(int64 namespace_id);
scoped_refptr<ProxyImpl> proxy_;
};
}
#endif