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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
Index: base/bind_internal_win.h
diff --git a/base/bind_internal_win.h b/base/bind_internal_win.h
index 17d3aa3f625c367cedd1b8c1b39a174a76843e09..b50361baef88e3fd7ba713ab63b0d29fe59c65d2 100644
--- a/base/bind_internal_win.h
+++ b/base/bind_internal_win.h
@@ -3,7 +3,6 @@
// DO NOT EDIT BY HAND!!!
-
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -312,6 +311,56 @@ class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6)> {
R (__fastcall *function_)(A1, A2, A3, A4, A5, A6);
};
+// __stdcall Function: Arity 7.
+template <typename R, typename A1, typename A2, typename A3, typename A4,
+ typename A5, typename A6, typename A7>
+class RunnableAdapter<R(__stdcall *)(A1, A2, A3, A4, A5, A6, A7)> {
+ public:
+ typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);
+
+ explicit RunnableAdapter(R(__stdcall *function)(A1, A2, A3, A4, A5, A6, A7))
+ : function_(function) {
+ }
+
+ R Run(typename CallbackParamTraits<A1>::ForwardType a1,
+ typename CallbackParamTraits<A2>::ForwardType a2,
+ typename CallbackParamTraits<A3>::ForwardType a3,
+ typename CallbackParamTraits<A4>::ForwardType a4,
+ typename CallbackParamTraits<A5>::ForwardType a5,
+ typename CallbackParamTraits<A6>::ForwardType a6,
+ typename CallbackParamTraits<A7>::ForwardType a7) {
+ return function_(a1, a2, a3, a4, a5, a6, a7);
+ }
+
+ private:
+ R (__stdcall *function_)(A1, A2, A3, A4, A5, A6, A7);
+};
+
+// __fastcall Function: Arity 7.
+template <typename R, typename A1, typename A2, typename A3, typename A4,
+ typename A5, typename A6, typename A7>
+class RunnableAdapter<R(__fastcall *)(A1, A2, A3, A4, A5, A6, A7)> {
+ public:
+ typedef R (RunType)(A1, A2, A3, A4, A5, A6, A7);
+
+ explicit RunnableAdapter(R(__fastcall *function)(A1, A2, A3, A4, A5, A6, A7))
+ : function_(function) {
+ }
+
+ R Run(typename CallbackParamTraits<A1>::ForwardType a1,
+ typename CallbackParamTraits<A2>::ForwardType a2,
+ typename CallbackParamTraits<A3>::ForwardType a3,
+ typename CallbackParamTraits<A4>::ForwardType a4,
+ typename CallbackParamTraits<A5>::ForwardType a5,
+ typename CallbackParamTraits<A6>::ForwardType a6,
+ typename CallbackParamTraits<A7>::ForwardType a7) {
+ return function_(a1, a2, a3, a4, a5, a6, a7);
+ }
+
+ private:
+ R (__fastcall *function_)(A1, A2, A3, A4, A5, A6, A7);
+};
+
} // namespace internal
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698