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

Side by Side Diff: chrome/common/render_messages_params.cc

Issue 4661001: Simplified AudioOutputStream interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/render_messages_params.h" 5 #include "chrome/common/render_messages_params.h"
6 6
7 #include "chrome/common/navigation_gesture.h" 7 #include "chrome/common/navigation_gesture.h"
8 #include "chrome/common/common_param_traits.h" 8 #include "chrome/common/common_param_traits.h"
9 #include "chrome/common/indexed_db_param_traits.h" 9 #include "chrome/common/indexed_db_param_traits.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // base::SharedMemoryHandle to HANDLE. We do not need to initialize this 129 // base::SharedMemoryHandle to HANDLE. We do not need to initialize this
130 // variable on Posix because it maps base::SharedMemoryHandle to 130 // variable on Posix because it maps base::SharedMemoryHandle to
131 // FileDescriptior, which has the default constructor. 131 // FileDescriptior, which has the default constructor.
132 metafile_data_handle = INVALID_HANDLE_VALUE; 132 metafile_data_handle = INVALID_HANDLE_VALUE;
133 #endif 133 #endif
134 } 134 }
135 135
136 ViewHostMsg_DidPrintPage_Params::~ViewHostMsg_DidPrintPage_Params() { 136 ViewHostMsg_DidPrintPage_Params::~ViewHostMsg_DidPrintPage_Params() {
137 } 137 }
138 138
139 ViewHostMsg_Audio_CreateStream_Params::ViewHostMsg_Audio_CreateStream_Params() 139 ViewHostMsg_Audio_CreateStream_Params::ViewHostMsg_Audio_CreateStream_Params() {
140 : packet_size(0) {
141 } 140 }
142 141
143 ViewHostMsg_Audio_CreateStream_Params:: 142 ViewHostMsg_Audio_CreateStream_Params::
144 ~ViewHostMsg_Audio_CreateStream_Params() { 143 ~ViewHostMsg_Audio_CreateStream_Params() {
145 } 144 }
146 145
147 ViewHostMsg_ShowPopup_Params::ViewHostMsg_ShowPopup_Params() 146 ViewHostMsg_ShowPopup_Params::ViewHostMsg_ShowPopup_Params()
148 : item_height(0), 147 : item_height(0),
149 item_font_size(0), 148 item_font_size(0),
150 selected_item(0), 149 selected_item(0),
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 l->append("<ViewHostMsg_DidPrintPage_Params>"); 1088 l->append("<ViewHostMsg_DidPrintPage_Params>");
1090 } 1089 }
1091 1090
1092 void ParamTraits<ViewHostMsg_Audio_CreateStream_Params>::Write( 1091 void ParamTraits<ViewHostMsg_Audio_CreateStream_Params>::Write(
1093 Message* m, 1092 Message* m,
1094 const param_type& p) { 1093 const param_type& p) {
1095 WriteParam(m, p.params.format); 1094 WriteParam(m, p.params.format);
1096 WriteParam(m, p.params.channels); 1095 WriteParam(m, p.params.channels);
1097 WriteParam(m, p.params.sample_rate); 1096 WriteParam(m, p.params.sample_rate);
1098 WriteParam(m, p.params.bits_per_sample); 1097 WriteParam(m, p.params.bits_per_sample);
1099 WriteParam(m, p.packet_size); 1098 WriteParam(m, p.params.samples_per_packet);
1100 } 1099 }
1101 1100
1102 bool ParamTraits<ViewHostMsg_Audio_CreateStream_Params>::Read(const Message* m, 1101 bool ParamTraits<ViewHostMsg_Audio_CreateStream_Params>::Read(const Message* m,
1103 void** iter, 1102 void** iter,
1104 param_type* p) { 1103 param_type* p) {
1105 return 1104 return
1106 ReadParam(m, iter, &p->params.format) && 1105 ReadParam(m, iter, &p->params.format) &&
1107 ReadParam(m, iter, &p->params.channels) && 1106 ReadParam(m, iter, &p->params.channels) &&
1108 ReadParam(m, iter, &p->params.sample_rate) && 1107 ReadParam(m, iter, &p->params.sample_rate) &&
1109 ReadParam(m, iter, &p->params.bits_per_sample) && 1108 ReadParam(m, iter, &p->params.bits_per_sample) &&
1110 ReadParam(m, iter, &p->packet_size); 1109 ReadParam(m, iter, &p->params.samples_per_packet);
1111 } 1110 }
1112 1111
1113 void ParamTraits<ViewHostMsg_Audio_CreateStream_Params>::Log( 1112 void ParamTraits<ViewHostMsg_Audio_CreateStream_Params>::Log(
1114 const param_type& p, 1113 const param_type& p,
1115 std::string* l) { 1114 std::string* l) {
1116 l->append("<ViewHostMsg_Audio_CreateStream_Params>("); 1115 l->append("<ViewHostMsg_Audio_CreateStream_Params>(");
1117 LogParam(p.params.format, l); 1116 LogParam(p.params.format, l);
1118 l->append(", "); 1117 l->append(", ");
1119 LogParam(p.params.channels, l); 1118 LogParam(p.params.channels, l);
1120 l->append(", "); 1119 l->append(", ");
1121 LogParam(p.params.sample_rate, l); 1120 LogParam(p.params.sample_rate, l);
1122 l->append(", "); 1121 l->append(", ");
1123 LogParam(p.params.bits_per_sample, l); 1122 LogParam(p.params.bits_per_sample, l);
1124 l->append(", "); 1123 l->append(", ");
1125 LogParam(p.packet_size, l); 1124 LogParam(p.params.samples_per_packet, l);
1126 l->append(")"); 1125 l->append(")");
1127 } 1126 }
1128 1127
1129 void ParamTraits<ViewHostMsg_ShowPopup_Params>::Write(Message* m, 1128 void ParamTraits<ViewHostMsg_ShowPopup_Params>::Write(Message* m,
1130 const param_type& p) { 1129 const param_type& p) {
1131 WriteParam(m, p.bounds); 1130 WriteParam(m, p.bounds);
1132 WriteParam(m, p.item_height); 1131 WriteParam(m, p.item_height);
1133 WriteParam(m, p.item_font_size); 1132 WriteParam(m, p.item_font_size);
1134 WriteParam(m, p.selected_item); 1133 WriteParam(m, p.selected_item);
1135 WriteParam(m, p.popup_items); 1134 WriteParam(m, p.popup_items);
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 const param_type& p, 1918 const param_type& p,
1920 std::string* l) { 1919 std::string* l) {
1921 l->append("("); 1920 l->append("(");
1922 LogParam(p.notification_type, l); 1921 LogParam(p.notification_type, l);
1923 l->append(", "); 1922 l->append(", ");
1924 LogParam(p.acc_obj, l); 1923 LogParam(p.acc_obj, l);
1925 l->append(")"); 1924 l->append(")");
1926 } 1925 }
1927 1926
1928 } // namespace IPC 1927 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698