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

Unified Diff: content/common/content_param_traits.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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/browser/site_per_process_browsertest.cc ('k') | content/common/input/event_with_latency_info.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 6cff525a3d340256d7c1a89a7366cebc61ad6d12..d38e9310fed42b5a1c7c59e42c2048b16ce480ba 100644
--- a/content/common/content_param_traits.cc
+++ b/content/common/content_param_traits.cc
@@ -14,12 +14,12 @@ namespace IPC {
void ParamTraits<WebInputEventPointer>::GetSize(base::PickleSizer* s,
const param_type& p) {
- s->AddData(p->size);
+ s->AddData(p->size());
}
void ParamTraits<WebInputEventPointer>::Write(base::Pickle* m,
const param_type& p) {
- m->WriteData(reinterpret_cast<const char*>(p), p->size);
+ m->WriteData(reinterpret_cast<const char*>(p), p->size());
}
bool ParamTraits<WebInputEventPointer>::Read(const base::Pickle* m,
@@ -37,12 +37,12 @@ bool ParamTraits<WebInputEventPointer>::Read(const base::Pickle* m,
}
param_type event = reinterpret_cast<param_type>(data);
// Check that the data size matches that of the event.
- if (data_length != static_cast<int>(event->size)) {
+ if (data_length != static_cast<int>(event->size())) {
NOTREACHED();
return false;
}
const size_t expected_size_for_type =
- ui::WebInputEventTraits::GetSize(event->type);
+ ui::WebInputEventTraits::GetSize(event->type());
if (data_length != static_cast<int>(expected_size_for_type)) {
NOTREACHED();
return false;
@@ -54,11 +54,11 @@ bool ParamTraits<WebInputEventPointer>::Read(const base::Pickle* m,
void ParamTraits<WebInputEventPointer>::Log(const param_type& p,
std::string* l) {
l->append("(");
- LogParam(p->size, l);
+ LogParam(p->size(), l);
l->append(", ");
- LogParam(p->type, l);
+ LogParam(p->type(), l);
l->append(", ");
- LogParam(p->timeStampSeconds, l);
+ LogParam(p->timeStampSeconds(), l);
l->append(")");
}
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/common/input/event_with_latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698