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

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: CR feedback. 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 internal::ScopedVariantArg disp_args[$(ARITY)]; 155 internal::ScopedVariantArg disp_args[$(ARITY)];
156 $for ARG [[ 156 $for ARG [[
157 157
158 hr = disp_args[$(ARITY) - $(ARG)].Wrap(p$(ARG)); 158 hr = disp_args[$(ARITY) - $(ARG)].Wrap(p$(ARG));
159 if (FAILED(hr)) 159 if (FAILED(hr))
160 return hr; 160 return hr;
161 ]] 161 ]]
162 ]] 162 ]]
163 163
164 164
165 // Invoke the method. 165 // Invoke the method. DISPATCH_PROPERTYPUT and DISPATCH_PROPERTYPUTREF require
166 // the parameter to be named, so |cNamedArgs| and |rgdispidNamedArgs| should
Wez 2012/07/17 19:53:24 Which parameter are you referring to here?
alexeypa (please no reviews) 2012/07/17 19:58:12 The parameter of a property setter. DISPATCH_PROPE
167 // be initialized.
166 168
167 $if ARITY > 0 [[ 169 $if ARITY > 0 [[
168 DISPPARAMS disp_params = { disp_args, NULL, $(ARITY), 0 }; 170 DISPPARAMS disp_params = { disp_args, NULL, $(ARITY), 0 };
169 ]] $else [[ 171 ]] $else [[
170 DISPPARAMS disp_params = { NULL, NULL, 0, 0 }; 172 DISPPARAMS disp_params = { NULL, NULL, 0, 0 };
171 ]] 173 ]]
172 174
175 DISPID dispid_named = DISPID_PROPERTYPUT;
176 if (flags == DISPATCH_PROPERTYPUT || flags == DISPATCH_PROPERTYPUTREF) {
177 disp_params.cNamedArgs = 1;
178 disp_params.rgdispidNamedArgs = &dispid_named;
179 }
180
173 hr = object->Invoke(disp_id, IID_NULL, LOCALE_USER_DEFAULT, flags, 181 hr = object->Invoke(disp_id, IID_NULL, LOCALE_USER_DEFAULT, flags,
174 &disp_params, disp_result, NULL, NULL); 182 &disp_params, disp_result, NULL, NULL);
175 if (FAILED(hr)) 183 if (FAILED(hr))
176 return hr; 184 return hr;
177 185
178 $if ARITY > 0 [[ 186 $if ARITY > 0 [[
179 187
180 // Unwrap the parameters. 188 // Unwrap the parameters.
181 $for ARG [[ 189 $for ARG [[
182 190
(...skipping 10 matching lines...) Expand all
193 return S_OK; 201 return S_OK;
194 } 202 }
195 203
196 ]] 204 ]]
197 205
198 } // namespace dispatch 206 } // namespace dispatch
199 207
200 } // namespace remoting 208 } // namespace remoting
201 209
202 #endif // REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_ 210 #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