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

Side by Side Diff: remoting/base/dispatch_win.h.pump

Issue 10736059: Add support of DISPATCH_PROPERTYPUT and DISPATCH_PROPERTYPUTREF to remoting::dispatch::Invoke(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « remoting/base/dispatch_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 $$ This is a pump file for generating file templates. Pump is a python 1 $$ This is a pump file for generating file templates. Pump is a python
2 $$ script that is part of the Google Test suite of utilities. Description 2 $$ script that is part of the Google Test suite of utilities. Description
3 $$ can be found here: 3 $$ can be found here:
4 $$ 4 $$
5 $$ http://code.google.com/p/googletest/wiki/PumpManual 5 $$ http://code.google.com/p/googletest/wiki/PumpManual
6 6
7 $$ MAX_ARITY controls the number of arguments that dispatch::Invoke() supports. 7 $$ MAX_ARITY controls the number of arguments that dispatch::Invoke() supports.
8 $$ It is choosen to match the number of arguments base::Bind() supports. 8 $$ It is choosen to match the number of arguments base::Bind() supports.
9 $var MAX_ARITY = 7 9 $var MAX_ARITY = 7
10 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 10 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 164
165 // Invoke the method. 165 // Invoke the method.
166 166
167 $if ARITY > 0 [[ 167 $if ARITY > 0 [[
168 DISPPARAMS disp_params = { disp_args, NULL, $(ARITY), 0 }; 168 DISPPARAMS disp_params = { disp_args, NULL, $(ARITY), 0 };
169 ]] $else [[ 169 ]] $else [[
170 DISPPARAMS disp_params = { NULL, NULL, 0, 0 }; 170 DISPPARAMS disp_params = { NULL, NULL, 0, 0 };
171 ]] 171 ]]
172 172
173 // DISPATCH_PROPERTYPUT and DISPATCH_PROPERTYPUTREF require special handling.
Wez 2012/07/12 22:26:15 nit: Put this in the comment above, after "Invoke
Wez 2012/07/12 22:26:15 Can you clarify what "special handling" means; you
alexeypa (please no reviews) 2012/07/12 23:16:52 Done.
alexeypa (please no reviews) 2012/07/12 23:16:52 Done.
174 DISPID dispid_named = DISPID_PROPERTYPUT;
175 if (flags == DISPATCH_PROPERTYPUT || flags == DISPATCH_PROPERTYPUTREF) {
176 disp_params.cNamedArgs = 1;
177 disp_params.rgdispidNamedArgs = &dispid_named;
178 }
179
173 hr = object->Invoke(disp_id, IID_NULL, LOCALE_USER_DEFAULT, flags, 180 hr = object->Invoke(disp_id, IID_NULL, LOCALE_USER_DEFAULT, flags,
174 &disp_params, disp_result, NULL, NULL); 181 &disp_params, disp_result, NULL, NULL);
175 if (FAILED(hr)) 182 if (FAILED(hr))
176 return hr; 183 return hr;
177 184
178 $if ARITY > 0 [[ 185 $if ARITY > 0 [[
179 186
180 // Unwrap the parameters. 187 // Unwrap the parameters.
181 $for ARG [[ 188 $for ARG [[
182 189
(...skipping 10 matching lines...) Expand all
193 return S_OK; 200 return S_OK;
194 } 201 }
195 202
196 ]] 203 ]]
197 204
198 } // namespace dispatch 205 } // namespace dispatch
199 206
200 } // namespace remoting 207 } // namespace remoting
201 208
202 #endif // REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_ 209 #endif // REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_
OLDNEW
« no previous file with comments | « remoting/base/dispatch_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698