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

Unified Diff: content/common/content_param_traits.cc

Issue 2694413006: Scope and clean up uses of AccessibilityMode. (Closed)
Patch Set: merge Created 3 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
« no previous file with comments | « content/common/content_param_traits.h ('k') | content/common/frame_message_enums.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/content_param_traits.cc
diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc
index 2960f78727f01daa5f6b4bc895018e08b40fc121..3b2793047cf978806d95bdfe4ccb7e0fd00c5ddb 100644
--- a/content/common/content_param_traits.cc
+++ b/content/common/content_param_traits.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include "base/strings/string_number_conversions.h"
+#include "content/common/accessibility_mode.h"
#include "content/common/message_port.h"
#include "ipc/ipc_mojo_param_traits.h"
#include "net/base/ip_endpoint.h"
@@ -89,6 +90,28 @@ void ParamTraits<content::MessagePort>::Log(const param_type& p,
std::string* l) {
}
+void ParamTraits<content::AccessibilityMode>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ IPC::GetParamSize(s, p.mode());
+}
+
+void ParamTraits<content::AccessibilityMode>::Write(base::Pickle* m,
+ const param_type& p) {
+ IPC::WriteParam(m, p.mode());
+}
+
+bool ParamTraits<content::AccessibilityMode>::Read(const base::Pickle* m,
+ base::PickleIterator* iter,
+ param_type* r) {
+ uint32_t value;
+ if (!IPC::ReadParam(m, iter, &value))
+ return false;
+ *r = content::AccessibilityMode(value);
+ return true;
+}
+
+void ParamTraits<content::AccessibilityMode>::Log(const param_type& p,
+ std::string* l) {}
} // namespace IPC
// Generate param traits size methods.
« no previous file with comments | « content/common/content_param_traits.h ('k') | content/common/frame_message_enums.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698