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

Side by Side Diff: content/common/input/input_param_traits.cc

Issue 1966983003: Generate param traits size methods for IPC files in content/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix owners Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/common/input/input_param_traits.h ('k') | content/common/media/media_param_traits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/input/input_param_traits.h" 5 #include "content/common/input/input_param_traits.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/common/content_param_traits.h" 9 #include "content/common/content_param_traits.h"
10 #include "content/common/input/synthetic_pinch_gesture_params.h" 10 #include "content/common/input/synthetic_pinch_gesture_params.h"
(...skipping 10 matching lines...) Expand all
21 const base::Pickle* m, 21 const base::Pickle* m,
22 base::PickleIterator* iter) { 22 base::PickleIterator* iter) {
23 std::unique_ptr<GestureType> gesture_params(new GestureType); 23 std::unique_ptr<GestureType> gesture_params(new GestureType);
24 if (!ReadParam(m, iter, gesture_params.get())) 24 if (!ReadParam(m, iter, gesture_params.get()))
25 return std::unique_ptr<content::SyntheticGestureParams>(); 25 return std::unique_ptr<content::SyntheticGestureParams>();
26 26
27 return std::move(gesture_params); 27 return std::move(gesture_params);
28 } 28 }
29 } // namespace 29 } // namespace
30 30
31 void ParamTraits<content::ScopedWebInputEvent>::GetSize(base::PickleSizer* s,
32 const param_type& p) {
33 bool valid_web_event = !!p;
34 GetParamSize(s, valid_web_event);
35 if (valid_web_event)
36 GetParamSize(s, static_cast<WebInputEventPointer>(p.get()));
37 }
38
31 void ParamTraits<content::ScopedWebInputEvent>::Write(base::Pickle* m, 39 void ParamTraits<content::ScopedWebInputEvent>::Write(base::Pickle* m,
32 const param_type& p) { 40 const param_type& p) {
33 bool valid_web_event = !!p; 41 bool valid_web_event = !!p;
34 WriteParam(m, valid_web_event); 42 WriteParam(m, valid_web_event);
35 if (valid_web_event) 43 if (valid_web_event)
36 WriteParam(m, static_cast<WebInputEventPointer>(p.get())); 44 WriteParam(m, static_cast<WebInputEventPointer>(p.get()));
37 } 45 }
38 46
39 bool ParamTraits<content::ScopedWebInputEvent>::Read(const base::Pickle* m, 47 bool ParamTraits<content::ScopedWebInputEvent>::Read(const base::Pickle* m,
40 base::PickleIterator* iter, 48 base::PickleIterator* iter,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 l); 157 l);
150 break; 158 break;
151 case content::SyntheticGestureParams::POINTER_ACTION: 159 case content::SyntheticGestureParams::POINTER_ACTION:
152 LogParam(*content::SyntheticPointerActionParams::Cast(p.gesture_params()), 160 LogParam(*content::SyntheticPointerActionParams::Cast(p.gesture_params()),
153 l); 161 l);
154 break; 162 break;
155 } 163 }
156 } 164 }
157 165
158 } // namespace IPC 166 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/input/input_param_traits.h ('k') | content/common/media/media_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698