| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common_param_traits.h" | 5 #include "chrome/common/common_param_traits.h" |
| 6 #include "content/common/common_param_traits.h" | 6 #include "content/common/common_param_traits.h" |
| 7 #include "ui/base/models/menu_model.h" | 7 #include "ui/base/models/menu_model.h" |
| 8 | 8 |
| 9 #define IPC_MESSAGE_IMPL | 9 #define IPC_MESSAGE_IMPL |
| 10 #include "chrome/common/automation_messages.h" | 10 #include "chrome/common/automation_messages.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 break; | 252 break; |
| 253 default: | 253 default: |
| 254 control = "UNKNOWN"; | 254 control = "UNKNOWN"; |
| 255 break; | 255 break; |
| 256 } | 256 } |
| 257 | 257 |
| 258 LogParam(control, l); | 258 LogParam(control, l); |
| 259 } | 259 } |
| 260 | 260 |
| 261 // static | 261 // static |
| 262 void ParamTraits<AutomationMsg_ExtensionResponseValues>::Write( | |
| 263 Message* m, | |
| 264 const param_type& p) { | |
| 265 m->WriteInt(p); | |
| 266 } | |
| 267 | |
| 268 // static | |
| 269 bool ParamTraits<AutomationMsg_ExtensionResponseValues>::Read( | |
| 270 const Message* m, | |
| 271 void** iter, | |
| 272 param_type* p) { | |
| 273 int type; | |
| 274 if (!m->ReadInt(iter, &type)) | |
| 275 return false; | |
| 276 *p = static_cast<AutomationMsg_ExtensionResponseValues>(type); | |
| 277 return true; | |
| 278 } | |
| 279 | |
| 280 // static | |
| 281 void ParamTraits<AutomationMsg_ExtensionResponseValues>::Log( | |
| 282 const param_type& p, | |
| 283 std::string* l) { | |
| 284 std::string control; | |
| 285 switch (p) { | |
| 286 case AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED: | |
| 287 control = "AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED"; | |
| 288 break; | |
| 289 case AUTOMATION_MSG_EXTENSION_INSTALL_FAILED: | |
| 290 control = "AUTOMATION_MSG_EXTENSION_INSTALL_FAILED"; | |
| 291 break; | |
| 292 default: | |
| 293 control = "UNKNOWN"; | |
| 294 break; | |
| 295 } | |
| 296 | |
| 297 LogParam(control, l); | |
| 298 } | |
| 299 | |
| 300 // static | |
| 301 void ParamTraits<AutomationMsg_ExtensionProperty>::Write(Message* m, | 262 void ParamTraits<AutomationMsg_ExtensionProperty>::Write(Message* m, |
| 302 const param_type& p) { | 263 const param_type& p) { |
| 303 m->WriteInt(p); | 264 m->WriteInt(p); |
| 304 } | 265 } |
| 305 | 266 |
| 306 // static | 267 // static |
| 307 bool ParamTraits<AutomationMsg_ExtensionProperty>::Read(const Message* m, | 268 bool ParamTraits<AutomationMsg_ExtensionProperty>::Read(const Message* m, |
| 308 void** iter, | 269 void** iter, |
| 309 param_type* p) { | 270 param_type* p) { |
| 310 int type; | 271 int type; |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 l->append(", "); | 737 l->append(", "); |
| 777 LogParam(p.disposition, l); | 738 LogParam(p.disposition, l); |
| 778 l->append(", "); | 739 l->append(", "); |
| 779 LogParam(p.user_gesture, l); | 740 LogParam(p.user_gesture, l); |
| 780 l->append(","); | 741 l->append(","); |
| 781 LogParam(p.profile_name, l); | 742 LogParam(p.profile_name, l); |
| 782 l->append(")"); | 743 l->append(")"); |
| 783 } | 744 } |
| 784 | 745 |
| 785 } // namespace IPC | 746 } // namespace IPC |
| OLD | NEW |