diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 12:13:08 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 12:13:08 +0000 |
commit | 0df3012fff2579aa4c09378fec0873f5c4589aab (patch) | |
tree | f63ad10d3efae0c81c3240293e20e7b003ea281b /chrome/common/render_messages.h | |
parent | ce29eeeb501db818f8f91158fd0f740a9673db61 (diff) | |
download | chromium_src-0df3012fff2579aa4c09378fec0873f5c4589aab.zip chromium_src-0df3012fff2579aa4c09378fec0873f5c4589aab.tar.gz chromium_src-0df3012fff2579aa4c09378fec0873f5c4589aab.tar.bz2 |
Implement InspectorClient's Settings API.
This CL implements InspectorClient's API for reading / writing inspector settings. Here is how this is done:
- inspector_client_impl.cc caches / serializes preferences into raw strings. It supports all kinds of settings except for string vector. I did not implement it since a) it requires more escaping b) I think we should get rid of it upstream. It then passes serialized settings string over IPC.
- There is a dedicated IPC message called UpdateInspectorSettings that takes care of settings update.
Two things I don't like:
1) reading settings and writing settings follow different paths: WebPreferences interface for read, delegate -> IPC for write. WebPreferences on read is used since these settings are needed very early in the page cycle. delegate -> IPC on write is the only option.
2) this looks like too much code on the Chrome side for functionality like this. Is there a more generic way of settings and persisting WebKit's preferences in Chrome? Should there be one?
Review URL: http://codereview.chromium.org/119041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r-- | chrome/common/render_messages.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 4511b0e..ee42f58 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1523,6 +1523,7 @@ struct ParamTraits<WebPreferences> { WriteParam(m, p.plugins_enabled); WriteParam(m, p.dom_paste_enabled); WriteParam(m, p.developer_extras_enabled); + WriteParam(m, p.inspector_settings); WriteParam(m, p.shrinks_standalone_images_to_fit); WriteParam(m, p.uses_universal_detector); WriteParam(m, p.text_areas_are_resizable); @@ -1552,6 +1553,7 @@ struct ParamTraits<WebPreferences> { ReadParam(m, iter, &p->plugins_enabled) && ReadParam(m, iter, &p->dom_paste_enabled) && ReadParam(m, iter, &p->developer_extras_enabled) && + ReadParam(m, iter, &p->inspector_settings) && ReadParam(m, iter, &p->shrinks_standalone_images_to_fit) && ReadParam(m, iter, &p->uses_universal_detector) && ReadParam(m, iter, &p->text_areas_are_resizable) && |