Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4108)

Unified Diff: chrome/common/render_messages.h

Issue 348071: First half of http://codereview.chromium.org/274014/show... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_uitest.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
===================================================================
--- chrome/common/render_messages.h (revision 30924)
+++ chrome/common/render_messages.h (working copy)
@@ -495,6 +495,24 @@
bool has_selection;
};
+// Signals a storage event.
+struct ViewMsg_DOMStorageEvent_Params {
+ // The key that generated the storage event. Null if clear() was called.
+ NullableString16 key_;
+
+ // The old value of this key. Null on clear() or if it didn't have a value.
+ NullableString16 old_value_;
+
+ // The new value of this key. Null on removeItem() or clear().
+ NullableString16 new_value_;
+
+ // The origin this is associated with.
+ string16 origin_;
+
+ // The storage type of this event.
+ DOMStorageType storage_type_;
+};
+
namespace IPC {
template <>
@@ -2204,6 +2222,40 @@
}
};
+// Traits for ViewMsg_DOMStorageEvent_Params.
+template <>
+struct ParamTraits<ViewMsg_DOMStorageEvent_Params> {
+ typedef ViewMsg_DOMStorageEvent_Params param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.key_);
+ WriteParam(m, p.old_value_);
+ WriteParam(m, p.new_value_);
+ WriteParam(m, p.origin_);
+ WriteParam(m, p.storage_type_);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->key_) &&
+ ReadParam(m, iter, &p->old_value_) &&
+ ReadParam(m, iter, &p->new_value_) &&
+ ReadParam(m, iter, &p->origin_) &&
+ ReadParam(m, iter, &p->storage_type_);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.key_, l);
+ l->append(L", ");
+ LogParam(p.old_value_, l);
+ l->append(L", ");
+ LogParam(p.new_value_, l);
+ l->append(L", ");
+ LogParam(p.origin_, l);
+ l->append(L", ");
+ LogParam(p.storage_type_, l);
+ l->append(L")");
+ }
+};
+
// Traits for WebCookie
template <>
struct ParamTraits<webkit_glue::WebCookie> {
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_uitest.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698