summaryrefslogtreecommitdiffstats
path: root/base/callback.h
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 21:44:06 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 21:44:06 +0000
commitd7f7524bb07b7789490e2c5532c139f81b69578f (patch)
tree0383bb00e9d244bafb1e6cf2371f155e252d2834 /base/callback.h
parent8e825e421af669e1d153a96c85d2971b44f89130 (diff)
downloadchromium_src-d7f7524bb07b7789490e2c5532c139f81b69578f.zip
chromium_src-d7f7524bb07b7789490e2c5532c139f81b69578f.tar.gz
chromium_src-d7f7524bb07b7789490e2c5532c139f81b69578f.tar.bz2
Make callback.h include callback_forward.h and add comments about forward declaration.
The first bit is designed to ensure that the correctness of callback_forward.h is tested by the callback unittests. The second bit is designed to increase the likelihood of developers actually using callback_forward.h as intended. BUG=None TEST=None Review URL: http://codereview.chromium.org/8846003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/callback.h')
-rw-r--r--base/callback.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/callback.h b/base/callback.h
index 16e3ee6..09c3ef7 100644
--- a/base/callback.h
+++ b/base/callback.h
@@ -11,9 +11,13 @@
#define BASE_CALLBACK_H_
#pragma once
+#include "base/callback_forward.h"
#include "base/callback_internal.h"
#include "base/template_util.h"
+// NOTE: Header files that do not require the full definition of Callback or
+// Closure should #include "base/callback_forward.h" instead of this file.
+
// New, super-duper, unified Callback system. This will eventually replace
// NewRunnableMethod, NewRunnableFunction, CreateFunctor, and CreateCallback
// systems currently in the Chromium code base.
@@ -229,6 +233,9 @@ namespace base {
// After this, create template specializations for 0-7 parameters. Note that
// even though the template typelist grows, the specialization still
// only has one type: the function signature.
+//
+// If you are thinking of forward declaring Callback in your own header file,
+// please include "base/callback_forward.h" instead.
template <typename Sig>
class Callback;