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

Unified Diff: base/bind_internal.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.h
diff --git a/base/bind_internal.h b/base/bind_internal.h
index fe3764bfb5145c5da73fb5d68fb99108335f8f2e..1a62645930c1ebf770dbb2cfd77d08b23362e15d 100644
--- a/base/bind_internal.h
+++ b/base/bind_internal.h
@@ -11,10 +11,16 @@
#define BASE_BIND_INTERNAL_H_
#pragma once
+#include "build/build_config.h"
+
#include "base/bind_helpers.h"
#include "base/callback_internal.h"
#include "base/template_util.h"
+#if defined(OS_WIN)
+#include "base/bind_internal_win.h"
+#endif
+
namespace base {
namespace internal {
@@ -67,91 +73,91 @@ struct FunctionTraits;
template <typename R>
struct FunctionTraits<R(*)()> {
typedef R (*NormalizedSig)();
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity 0.
template <typename R, typename T>
struct FunctionTraits<R(T::*)()> {
typedef R (T::*NormalizedSig)();
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity 0.
template <typename R, typename T>
struct FunctionTraits<R(T::*)() const> {
typedef R (T::*NormalizedSig)();
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Function: Arity 1.
template <typename R, typename X1>
struct FunctionTraits<R(*)(X1)> {
typedef R (*NormalizedSig)(X1);
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity 1.
template <typename R, typename T, typename X1>
struct FunctionTraits<R(T::*)(X1)> {
typedef R (T::*NormalizedSig)(X1);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity 1.
template <typename R, typename T, typename X1>
struct FunctionTraits<R(T::*)(X1) const> {
typedef R (T::*NormalizedSig)(X1);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Function: Arity 2.
template <typename R, typename X1, typename X2>
struct FunctionTraits<R(*)(X1, X2)> {
typedef R (*NormalizedSig)(X1, X2);
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity 2.
template <typename R, typename T, typename X1, typename X2>
struct FunctionTraits<R(T::*)(X1, X2)> {
typedef R (T::*NormalizedSig)(X1, X2);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity 2.
template <typename R, typename T, typename X1, typename X2>
struct FunctionTraits<R(T::*)(X1, X2) const> {
typedef R (T::*NormalizedSig)(X1, X2);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Function: Arity 3.
template <typename R, typename X1, typename X2, typename X3>
struct FunctionTraits<R(*)(X1, X2, X3)> {
typedef R (*NormalizedSig)(X1, X2, X3);
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity 3.
template <typename R, typename T, typename X1, typename X2, typename X3>
struct FunctionTraits<R(T::*)(X1, X2, X3)> {
typedef R (T::*NormalizedSig)(X1, X2, X3);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity 3.
template <typename R, typename T, typename X1, typename X2, typename X3>
struct FunctionTraits<R(T::*)(X1, X2, X3) const> {
typedef R (T::*NormalizedSig)(X1, X2, X3);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Function: Arity 4.
template <typename R, typename X1, typename X2, typename X3, typename X4>
struct FunctionTraits<R(*)(X1, X2, X3, X4)> {
typedef R (*NormalizedSig)(X1, X2, X3, X4);
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity 4.
@@ -159,7 +165,7 @@ template <typename R, typename T, typename X1, typename X2, typename X3,
typename X4>
struct FunctionTraits<R(T::*)(X1, X2, X3, X4)> {
typedef R (T::*NormalizedSig)(X1, X2, X3, X4);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity 4.
@@ -167,7 +173,7 @@ template <typename R, typename T, typename X1, typename X2, typename X3,
typename X4>
struct FunctionTraits<R(T::*)(X1, X2, X3, X4) const> {
typedef R (T::*NormalizedSig)(X1, X2, X3, X4);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Function: Arity 5.
@@ -175,7 +181,7 @@ template <typename R, typename X1, typename X2, typename X3, typename X4,
typename X5>
struct FunctionTraits<R(*)(X1, X2, X3, X4, X5)> {
typedef R (*NormalizedSig)(X1, X2, X3, X4, X5);
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity 5.
@@ -183,7 +189,7 @@ template <typename R, typename T, typename X1, typename X2, typename X3,
typename X4, typename X5>
struct FunctionTraits<R(T::*)(X1, X2, X3, X4, X5)> {
typedef R (T::*NormalizedSig)(X1, X2, X3, X4, X5);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity 5.
@@ -191,7 +197,7 @@ template <typename R, typename T, typename X1, typename X2, typename X3,
typename X4, typename X5>
struct FunctionTraits<R(T::*)(X1, X2, X3, X4, X5) const> {
typedef R (T::*NormalizedSig)(X1, X2, X3, X4, X5);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Function: Arity 6.
@@ -199,7 +205,7 @@ template <typename R, typename X1, typename X2, typename X3, typename X4,
typename X5, typename X6>
struct FunctionTraits<R(*)(X1, X2, X3, X4, X5, X6)> {
typedef R (*NormalizedSig)(X1, X2, X3, X4, X5, X6);
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity 6.
@@ -207,7 +213,7 @@ template <typename R, typename T, typename X1, typename X2, typename X3,
typename X4, typename X5, typename X6>
struct FunctionTraits<R(T::*)(X1, X2, X3, X4, X5, X6)> {
typedef R (T::*NormalizedSig)(X1, X2, X3, X4, X5, X6);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity 6.
@@ -215,7 +221,7 @@ template <typename R, typename T, typename X1, typename X2, typename X3,
typename X4, typename X5, typename X6>
struct FunctionTraits<R(T::*)(X1, X2, X3, X4, X5, X6) const> {
typedef R (T::*NormalizedSig)(X1, X2, X3, X4, X5, X6);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// InvokerN<>
« no previous file with comments | « base/base.gypi ('k') | base/bind_internal.h.pump » ('j') | base/bind_internal.h.pump » ('J')

Powered by Google App Engine
This is Rietveld 408576698