- Persist localStorage data across sessions when a cache path is specified (issue #139).

- Add a localStorage test to cefclient.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@140 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-11-17 17:28:32 +00:00
parent 6ad535823a
commit 3dd54c536c
23 changed files with 1035 additions and 14 deletions

View File

@ -9,6 +9,7 @@
#include "browser_request_context.h"
#include "cef_process.h"
#include "cef_thread.h"
#include "dom_storage_context.h"
#include "base/at_exit.h"
#include "base/file_path.h"
@ -56,6 +57,11 @@ public:
scoped_refptr<BrowserRequestContext> request_context()
{ return request_context_; }
// The DOMStorageContext object is managed by CefProcessUIThread.
void set_storage_context(DOMStorageContext* storage_context)
{ storage_context_.reset(storage_context); }
DOMStorageContext* storage_context() { return storage_context_.get(); }
private:
// Manages the various process threads.
scoped_refptr<CefProcess> process_;
@ -67,10 +73,11 @@ private:
std::wstring cache_path_;
WebPreferences* webprefs_;
scoped_refptr<BrowserRequestContext> request_context_;
scoped_ptr<DOMStorageContext> storage_context_;
// Map of browsers that currently exist.
BrowserList browserlist_;
// Used for assigning unique IDs to browser instances.
int next_browser_id_;
};