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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
old mode 100644
new mode 100755
index c814b84c4d2230a79442e0e1693cca7d5cfb61f8..124e575f3f5ad4833b639abf6c4a5af12f62ffaf
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -1700,6 +1700,41 @@ struct ParamTraits<gfx::NativeView> {
#endif // defined(OS_POSIX)
+template <>
+struct ParamTraits<AudioOutputStream::State> {
+ typedef AudioOutputStream::State param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteInt(p);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ int type;
+ if (!m->ReadInt(iter, &type))
+ return false;
+ *p = static_cast<AudioOutputStream::State>(type);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ std::wstring state;
+ switch (p) {
+ case AudioOutputStream::STATE_PAUSED:
+ state = L"AUDIO_STREAM_PAUSED";
+ break;
+ case AudioOutputStream::STATE_STARTED:
+ state = L"AUDIO_STREAM_STARTED";
+ break;
+ case AudioOutputStream::STATE_ERROR:
+ state = L"AUDIO_STREAM_ERROR";
+ break;
+ default:
+ state = L"UNKNOWN";
+ break;
+ }
+
+ LogParam(state, l);
+ }
+};
+
+
} // namespace IPC
« 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