OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/render_messages_params.h" | 5 #include "chrome/common/render_messages_params.h" |
6 | 6 |
7 #include "chrome/common/navigation_gesture.h" | 7 #include "chrome/common/navigation_gesture.h" |
8 #include "chrome/common/common_param_traits.h" | 8 #include "chrome/common/common_param_traits.h" |
9 #include "chrome/common/indexed_db_param_traits.h" | 9 #include "chrome/common/indexed_db_param_traits.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 typedef ViewHostMsg_AccessibilityNotification_Params params; | 498 typedef ViewHostMsg_AccessibilityNotification_Params params; |
499 typedef params::NotificationType param_type; | 499 typedef params::NotificationType param_type; |
500 static void Write(Message* m, const param_type& p) { | 500 static void Write(Message* m, const param_type& p) { |
501 int val = static_cast<int>(p); | 501 int val = static_cast<int>(p); |
502 WriteParam(m, val); | 502 WriteParam(m, val); |
503 } | 503 } |
504 static bool Read(const Message* m, void** iter, param_type* p) { | 504 static bool Read(const Message* m, void** iter, param_type* p) { |
505 int val = 0; | 505 int val = 0; |
506 if (!ReadParam(m, iter, &val) || | 506 if (!ReadParam(m, iter, &val) || |
507 val < params::NOTIFICATION_TYPE_CHECK_STATE_CHANGED || | 507 val < params::NOTIFICATION_TYPE_CHECK_STATE_CHANGED || |
508 val > params::NOTIFICATION_TYPE_VALUE_CHANGED) { | 508 val > params::NOTIFICATION_TYPE_SELECTED_TEXT_CHANGED) { |
509 return false; | 509 return false; |
510 } | 510 } |
511 *p = static_cast<param_type>(val); | 511 *p = static_cast<param_type>(val); |
512 return true; | 512 return true; |
513 } | 513 } |
514 static void Log(const param_type& p, std::string* l) { | 514 static void Log(const param_type& p, std::string* l) { |
515 ParamTraits<int>::Log(static_cast<int>(p), l); | 515 ParamTraits<int>::Log(static_cast<int>(p), l); |
516 } | 516 } |
517 }; | 517 }; |
518 | 518 |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 const param_type& p, | 1834 const param_type& p, |
1835 std::string* l) { | 1835 std::string* l) { |
1836 l->append("("); | 1836 l->append("("); |
1837 LogParam(p.notification_type, l); | 1837 LogParam(p.notification_type, l); |
1838 l->append(", "); | 1838 l->append(", "); |
1839 LogParam(p.acc_obj, l); | 1839 LogParam(p.acc_obj, l); |
1840 l->append(")"); | 1840 l->append(")"); |
1841 } | 1841 } |
1842 | 1842 |
1843 } // namespace IPC | 1843 } // namespace IPC |
OLD | NEW |