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

Unified Diff: extensions/common/extension_messages.cc

Issue 942533003: Enable <webview>.executeScript outside of Apps and Extensions [1] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_routingid_user_script_UserScriptSet_non_hostset_2
Patch Set: Add a test. Created 5 years, 9 months 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
Index: extensions/common/extension_messages.cc
diff --git a/extensions/common/extension_messages.cc b/extensions/common/extension_messages.cc
index 94a6bd0abcf7c926d22fe0d69ff3dff4f817cc12..41b8023423f8b4969535e9a37c737551335b6fe1 100644
--- a/extensions/common/extension_messages.cc
+++ b/extensions/common/extension_messages.cc
@@ -249,6 +249,30 @@ void ParamTraits<ManifestPermissionSet>::Log(
LogParam(p.map(), l);
}
+void ParamTraits<HostID>::Write(
+ Message* m, const param_type& p) {
+ WriteParam(m, p.type());
+ WriteParam(m, p.id());
+}
+
+bool ParamTraits<HostID>::Read(
+ const Message* m, PickleIterator* iter, param_type* r) {
+ HostID::HostType type;
+ std::string id;
+ if (!ReadParam(m, iter, &type))
+ return false;
+ if (!ReadParam(m, iter, &id))
+ return false;
+ *r = HostID(type, id);
+ return true;
+}
+
+void ParamTraits<HostID>::Log(
+ const param_type& p, std::string* l) {
+ LogParam(p.type(), l);
+ LogParam(p.id(), l);
+}
+
void ParamTraits<ExtensionMsg_PermissionSetStruct>::Write(Message* m,
const param_type& p) {
WriteParam(m, p.apis);

Powered by Google App Engine
This is Rietveld 408576698