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

Side by Side Diff: base/bind_internal_win.h

Issue 8728010: Increase Bind/Callback Arity from 6 -> 7. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated comments. Created 9 years 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 // This file was GENERATED by command: 1 // This file was GENERATED by command:
2 // pump.py bind_internal_win.h.pump 2 // pump.py bind_internal_win.h.pump
3 // DO NOT EDIT BY HAND!!! 3 // DO NOT EDIT BY HAND!!!
4 4
5 5
6
7 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 6 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
8 // Use of this source code is governed by a BSD-style license that can be 7 // Use of this source code is governed by a BSD-style license that can be
9 // found in the LICENSE file. 8 // found in the LICENSE file.
10 9
11 // Specializations of RunnableAdapter<> for Windows specific calling 10 // Specializations of RunnableAdapter<> for Windows specific calling
12 // conventions. Please see base/bind_internal.h for more info. 11 // conventions. Please see base/bind_internal.h for more info.
13 12
14 #ifndef BASE_BIND_INTERNAL_WIN_H_ 13 #ifndef BASE_BIND_INTERNAL_WIN_H_
15 #define BASE_BIND_INTERNAL_WIN_H_ 14 #define BASE_BIND_INTERNAL_WIN_H_
16 #pragma once 15 #pragma once
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 typename CallbackParamTraits<A4>::ForwardType a4, 304 typename CallbackParamTraits<A4>::ForwardType a4,
306 typename CallbackParamTraits<A5>::ForwardType a5, 305 typename CallbackParamTraits<A5>::ForwardType a5,
307 typename CallbackParamTraits<A6>::ForwardType a6) { 306 typename CallbackParamTraits<A6>::ForwardType a6) {
308 return function_(a1, a2, a3, a4, a5, a6); 307 return function_(a1, a2, a3, a4, a5, a6);
309 } 308 }
310 309
311 private: 310 private:
312 R (__fastcall *function_)(A1, A2, A3, A4, A5, A6); 311 R (__fastcall *function_)(A1, A2, A3, A4, A5, A6);
313 }; 312 };
314 313
314 // __stdcall Function: Arity 7.
315 template <typename R, typename A1, typename A2, typename A3, typename A4,
316 typename A5, typename A6, typename A7>
317 class RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5, A6, A7)> {
318 public:
319 typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);
320
321 explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6, A7))
322 : function_(function) {
323 }
324
325 R Run(typename CallbackParamTraits<A1>::ForwardType a1,
326 typename CallbackParamTraits<A2>::ForwardType a2,
327 typename CallbackParamTraits<A3>::ForwardType a3,
328 typename CallbackParamTraits<A4>::ForwardType a4,
329 typename CallbackParamTraits<A5>::ForwardType a5,
330 typename CallbackParamTraits<A6>::ForwardType a6,
331 typename CallbackParamTraits<A7>::ForwardType a7) {
332 return function_(a1, a2, a3, a4, a5, a6, a7);
333 }
334
335 private:
336 R (__stdcall *function_)(A1, A2, A3, A4, A5, A6, A7);
337 };
338
339 // __fastcall Function: Arity 7.
340 template <typename R, typename A1, typename A2, typename A3, typename A4,
341 typename A5, typename A6, typename A7>
342 class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6, A7)> {
343 public:
344 typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);
345
346 explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6, A7))
347 : function_(function) {
348 }
349
350 R Run(typename CallbackParamTraits<A1>::ForwardType a1,
351 typename CallbackParamTraits<A2>::ForwardType a2,
352 typename CallbackParamTraits<A3>::ForwardType a3,
353 typename CallbackParamTraits<A4>::ForwardType a4,
354 typename CallbackParamTraits<A5>::ForwardType a5,
355 typename CallbackParamTraits<A6>::ForwardType a6,
356 typename CallbackParamTraits<A7>::ForwardType a7) {
357 return function_(a1, a2, a3, a4, a5, a6, a7);
358 }
359
360 private:
361 R (__fastcall *function_)(A1, A2, A3, A4, A5, A6, A7);
362 };
363
315 } // namespace internal 364 } // namespace internal
316 } // namespace base 365 } // namespace base
317 366
318 #endif // !defined(ARCH_CPU_X86_64) 367 #endif // !defined(ARCH_CPU_X86_64)
319 368
320 #endif // BASE_BIND_INTERNAL_WIN_H_ 369 #endif // BASE_BIND_INTERNAL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698