OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // NOTE: New type and trait definitions that will be used by Chrome Frame must |
| 6 // be placed in automation_message_types2.cc. |
| 7 |
| 8 #include "chrome/common/automation_message_types.h" |
| 9 |
| 10 namespace IPC { |
| 11 |
| 12 // static |
| 13 void ParamTraits<AutomationMsg_ExtensionResponseValues>::Write( |
| 14 Message* m, |
| 15 const param_type& p) { |
| 16 m->WriteInt(p); |
| 17 } |
| 18 |
| 19 // static |
| 20 bool ParamTraits<AutomationMsg_ExtensionResponseValues>::Read( |
| 21 const Message* m, |
| 22 void** iter, |
| 23 param_type* p) { |
| 24 int type; |
| 25 if (!m->ReadInt(iter, &type)) |
| 26 return false; |
| 27 *p = static_cast<AutomationMsg_ExtensionResponseValues>(type); |
| 28 return true; |
| 29 } |
| 30 |
| 31 // static |
| 32 void ParamTraits<AutomationMsg_ExtensionResponseValues>::Log( |
| 33 const param_type& p, |
| 34 std::string* l) { |
| 35 std::string control; |
| 36 switch (p) { |
| 37 case AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED: |
| 38 control = "AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED"; |
| 39 break; |
| 40 case AUTOMATION_MSG_EXTENSION_INSTALL_FAILED: |
| 41 control = "AUTOMATION_MSG_EXTENSION_INSTALL_FAILED"; |
| 42 break; |
| 43 default: |
| 44 control = "UNKNOWN"; |
| 45 break; |
| 46 } |
| 47 |
| 48 LogParam(control, l); |
| 49 } |
| 50 |
| 51 } // namespace IPC |
OLD | NEW |