| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/content_param_traits.h" | 5 #include "content/common/content_param_traits.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "content/common/input/web_input_event_traits.h" | 8 #include "content/common/input/web_input_event_traits.h" |
| 9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
| 10 #include "ui/gfx/range/range.h" | 10 #include "ui/gfx/range/range.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 bool ParamTraits<WebInputEventPointer>::Read(const Message* m, | 57 bool ParamTraits<WebInputEventPointer>::Read(const Message* m, |
| 58 PickleIterator* iter, | 58 PickleIterator* iter, |
| 59 param_type* r) { | 59 param_type* r) { |
| 60 const char* data; | 60 const char* data; |
| 61 int data_length; | 61 int data_length; |
| 62 if (!m->ReadData(iter, &data, &data_length)) { | 62 if (!m->ReadData(iter, &data, &data_length)) { |
| 63 NOTREACHED(); | 63 NOTREACHED(); |
| 64 return false; | 64 return false; |
| 65 } | 65 } |
| 66 if (data_length < static_cast<int>(sizeof(WebKit::WebInputEvent))) { | 66 if (data_length < static_cast<int>(sizeof(blink::WebInputEvent))) { |
| 67 NOTREACHED(); | 67 NOTREACHED(); |
| 68 return false; | 68 return false; |
| 69 } | 69 } |
| 70 param_type event = reinterpret_cast<param_type>(data); | 70 param_type event = reinterpret_cast<param_type>(data); |
| 71 // Check that the data size matches that of the event. | 71 // Check that the data size matches that of the event. |
| 72 if (data_length != static_cast<int>(event->size)) { | 72 if (data_length != static_cast<int>(event->size)) { |
| 73 NOTREACHED(); | 73 NOTREACHED(); |
| 74 return false; | 74 return false; |
| 75 } | 75 } |
| 76 const size_t expected_size_for_type = | 76 const size_t expected_size_for_type = |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ | 109 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ |
| 110 #include "content/common/content_param_traits_macros.h" | 110 #include "content/common/content_param_traits_macros.h" |
| 111 } // namespace IPC | 111 } // namespace IPC |
| 112 | 112 |
| 113 // Generate param traits log methods. | 113 // Generate param traits log methods. |
| 114 #include "ipc/param_traits_log_macros.h" | 114 #include "ipc/param_traits_log_macros.h" |
| 115 namespace IPC { | 115 namespace IPC { |
| 116 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ | 116 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ |
| 117 #include "content/common/content_param_traits_macros.h" | 117 #include "content/common/content_param_traits_macros.h" |
| 118 } // namespace IPC | 118 } // namespace IPC |
| OLD | NEW |