Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1672)

Side by Side Diff: chrome/common/render_messages.h

Issue 20410: Audio related IPC messages and handlers from browser to renderer (Closed)
Patch Set: cleanup Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698