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

Unified Diff: base/bind_internal_win.h

Issue 6561004: Callback support for __fastcall and __stdcall functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Address will's comments. Created 9 years, 10 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 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
new file mode 100644
index 0000000000000000000000000000000000000000..dab8d51717b7bb15f496f77f3f6495159d9e363b
--- /dev/null
+++ b/base/bind_internal_win.h
@@ -0,0 +1,128 @@
+// This file was GENERATED by command:
+// pump.py bind_internal_win.h.pump
+// 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.
+
+// Specializations of FunctionTraits<> for Windows specific calling
+// conventions. Please see base/bind_internal.h for more info.
+
+#ifndef BASE_BIND_INTERNAL_WIN_H_
+#define BASE_BIND_INTERNAL_WIN_H_
+#pragma once
+
+namespace base {
+namespace internal {
+
+template <typename Sig>
+struct FunctionTraits;
+
+// __stdcall Function: Arity 0.
+template <typename R>
+struct FunctionTraits<R(__stdcall *)()> {
+ typedef R (*NormalizedSig)();
+ typedef false_type IsMethod;
+};
+
+// __fastcall Function: Arity 0.
+template <typename R>
+struct FunctionTraits<R(__fastcall *)()> {
+ typedef R (*NormalizedSig)();
+ typedef false_type IsMethod;
+};
+
+// __stdcall Function: Arity 1.
+template <typename R, typename X1>
+struct FunctionTraits<R(__stdcall *)(X1)> {
+ typedef R (*NormalizedSig)(X1);
+ typedef false_type IsMethod;
+};
+
+// __fastcall Function: Arity 1.
+template <typename R, typename X1>
+struct FunctionTraits<R(__fastcall *)(X1)> {
+ typedef R (*NormalizedSig)(X1);
+ typedef false_type IsMethod;
+};
+
+// __stdcall Function: Arity 2.
+template <typename R, typename X1, typename X2>
+struct FunctionTraits<R(__stdcall *)(X1, X2)> {
+ typedef R (*NormalizedSig)(X1, X2);
+ typedef false_type IsMethod;
+};
+
+// __fastcall Function: Arity 2.
+template <typename R, typename X1, typename X2>
+struct FunctionTraits<R(__fastcall *)(X1, X2)> {
+ typedef R (*NormalizedSig)(X1, X2);
+ typedef false_type IsMethod;
+};
+
+// __stdcall Function: Arity 3.
+template <typename R, typename X1, typename X2, typename X3>
+struct FunctionTraits<R(__stdcall *)(X1, X2, X3)> {
+ typedef R (*NormalizedSig)(X1, X2, X3);
+ typedef false_type IsMethod;
+};
+
+// __fastcall Function: Arity 3.
+template <typename R, typename X1, typename X2, typename X3>
+struct FunctionTraits<R(__fastcall *)(X1, X2, X3)> {
+ typedef R (*NormalizedSig)(X1, X2, X3);
+ typedef false_type IsMethod;
+};
+
+// __stdcall Function: Arity 4.
+template <typename R, typename X1, typename X2, typename X3, typename X4>
+struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4)> {
+ typedef R (*NormalizedSig)(X1, X2, X3, X4);
+ typedef false_type IsMethod;
+};
+
+// __fastcall Function: Arity 4.
+template <typename R, typename X1, typename X2, typename X3, typename X4>
+struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4)> {
+ typedef R (*NormalizedSig)(X1, X2, X3, X4);
+ typedef false_type IsMethod;
+};
+
+// __stdcall Function: Arity 5.
+template <typename R, typename X1, typename X2, typename X3, typename X4,
+ typename X5>
+struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4, X5)> {
+ typedef R (*NormalizedSig)(X1, X2, X3, X4, X5);
+ typedef false_type IsMethod;
+};
+
+// __fastcall Function: Arity 5.
+template <typename R, typename X1, typename X2, typename X3, typename X4,
+ typename X5>
+struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4, X5)> {
+ typedef R (*NormalizedSig)(X1, X2, X3, X4, X5);
+ typedef false_type IsMethod;
+};
+
+// __stdcall Function: Arity 6.
+template <typename R, typename X1, typename X2, typename X3, typename X4,
+ typename X5, typename X6>
+struct FunctionTraits<R(__stdcall *)(X1, X2, X3, X4, X5, X6)> {
+ typedef R (*NormalizedSig)(X1, X2, X3, X4, X5, X6);
+ typedef false_type IsMethod;
+};
+
+// __fastcall Function: Arity 6.
+template <typename R, typename X1, typename X2, typename X3, typename X4,
+ typename X5, typename X6>
+struct FunctionTraits<R(__fastcall *)(X1, X2, X3, X4, X5, X6)> {
+ typedef R (*NormalizedSig)(X1, X2, X3, X4, X5, X6);
+ typedef false_type IsMethod;
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_BIND_INTERNAL_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698