Add preferences support for embedding applications
Applications can use brightray::BrowserContext::prefs to get access to preferences that are persisted between launches. brightray::BrowserContext::RegisterPrefs must be used to register preferences before they're accessed. Updated libchromiumcontent to pull in preferences support. * vendor/libchromiumcontent 3944c1c...b6a0d85 (2): > Actually compile the base/prefs code > Export symbols from base/prefs
This commit is contained in:
parent
5db043f7d4
commit
a2a2cd1936
3 changed files with 24 additions and 1 deletions
|
@ -8,6 +8,9 @@
|
|||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
|
||||
class PrefRegistrySimple;
|
||||
class PrefService;
|
||||
|
||||
namespace brightray {
|
||||
|
||||
class URLRequestContextGetter;
|
||||
|
@ -19,6 +22,12 @@ public:
|
|||
|
||||
net::URLRequestContextGetter* CreateRequestContext(content::ProtocolHandlerMap*);
|
||||
|
||||
PrefService* prefs() { return prefs_.get(); }
|
||||
|
||||
protected:
|
||||
// Subclasses should override this to register custom preferences.
|
||||
virtual void RegisterPrefs(PrefRegistrySimple*) {}
|
||||
|
||||
private:
|
||||
class ResourceContext;
|
||||
|
||||
|
@ -37,6 +46,7 @@ private:
|
|||
|
||||
scoped_ptr<ResourceContext> resource_context_;
|
||||
scoped_refptr<URLRequestContextGetter> url_request_getter_;
|
||||
scoped_ptr<PrefService> prefs_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BrowserContext);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue