Hello,
In you background.html, you could have something like this:
<html>
<script>
settings = {
get foo() {
return localStorage['foo'];
},
set foo(val) {
localStorage['foo'] = val;
}
}
</script>
</html>
Now in your options page, you can simply use chrome.extensions.getBackgroundPage. For example in options.html:
<html>
<head>
<script>
var bkg = chrome.extension.getBackgroundPage();
function saveOptions() {
bkg.settings.foo = 'bar';
}
function restoreOptions() {
document.getElementById('foo').value = bkg.settings.foo;
}
</script>
</head>
<body onload="restoreOptions()">
<form onsubmit="return false;">
<input id="foo" type="text" />
<button onclick="saveOptions();">Save</button>
</form>
</body>
</html>
Remember one thing, the dev guide is your best friend :)
http://code.google.com/chrome/extensions/devguide.html