OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include <map> | 10 #include <map> |
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 return true; | 1693 return true; |
1694 } | 1694 } |
1695 | 1695 |
1696 static void Log(const param_type& p, std::wstring* l) { | 1696 static void Log(const param_type& p, std::wstring* l) { |
1697 l->append(StringPrintf(L"<gfx::NativeView>")); | 1697 l->append(StringPrintf(L"<gfx::NativeView>")); |
1698 } | 1698 } |
1699 }; | 1699 }; |
1700 | 1700 |
1701 #endif // defined(OS_POSIX) | 1701 #endif // defined(OS_POSIX) |
1702 | 1702 |
| 1703 template <> |
| 1704 struct ParamTraits<AudioOutputStream::State> { |
| 1705 typedef AudioOutputStream::State param_type; |
| 1706 static void Write(Message* m, const param_type& p) { |
| 1707 m->WriteInt(p); |
| 1708 } |
| 1709 static bool Read(const Message* m, void** iter, param_type* p) { |
| 1710 int type; |
| 1711 if (!m->ReadInt(iter, &type)) |
| 1712 return false; |
| 1713 *p = static_cast<AudioOutputStream::State>(type); |
| 1714 return true; |
| 1715 } |
| 1716 static void Log(const param_type& p, std::wstring* l) { |
| 1717 std::wstring state; |
| 1718 switch (p) { |
| 1719 case AudioOutputStream::STATE_PAUSED: |
| 1720 state = L"AUDIO_STREAM_PAUSED"; |
| 1721 break; |
| 1722 case AudioOutputStream::STATE_STARTED: |
| 1723 state = L"AUDIO_STREAM_STARTED"; |
| 1724 break; |
| 1725 case AudioOutputStream::STATE_ERROR: |
| 1726 state = L"AUDIO_STREAM_ERROR"; |
| 1727 break; |
| 1728 default: |
| 1729 state = L"UNKNOWN"; |
| 1730 break; |
| 1731 } |
| 1732 |
| 1733 LogParam(state, l); |
| 1734 } |
| 1735 }; |
| 1736 |
| 1737 |
1703 } // namespace IPC | 1738 } // namespace IPC |
1704 | 1739 |
1705 | 1740 |
1706 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 1741 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
1707 #include "chrome/common/ipc_message_macros.h" | 1742 #include "chrome/common/ipc_message_macros.h" |
1708 | 1743 |
1709 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 1744 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |