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

Side by Side Diff: base/callback_old.h

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_CALLBACK_OLD_H_ 5 #ifndef BASE_CALLBACK_OLD_H_
6 #define BASE_CALLBACK_OLD_H_ 6 #define BASE_CALLBACK_OLD_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/raw_scoped_refptr_mismatch_checker.h"
9 #include "base/tuple.h" 10 #include "base/tuple.h"
10 #include "base/raw_scoped_refptr_mismatch_checker.h"
11 11
12 // Callback -------------------------------------------------------------------- 12 // Callback --------------------------------------------------------------------
13 // 13 //
14 // A Callback is like a Task but with unbound parameters. It is basically an 14 // A Callback is like a Task but with unbound parameters. It is basically an
15 // object-oriented function pointer. 15 // object-oriented function pointer.
16 // 16 //
17 // Callbacks are designed to work with Tuples. A set of helper functions and 17 // Callbacks are designed to work with Tuples. A set of helper functions and
18 // classes is provided to hide the Tuple details from the consumer. Client 18 // classes is provided to hide the Tuple details from the consumer. Client
19 // code will generally work with the CallbackRunner base class, which merely 19 // code will generally work with the CallbackRunner base class, which merely
20 // provides a Run method and is returned by the New* functions. This allows 20 // provides a Run method and is returned by the New* functions. This allows
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 }; 245 };
246 246
247 template <class T, typename ReturnValue> 247 template <class T, typename ReturnValue>
248 typename CallbackWithReturnValue<ReturnValue>::Type* 248 typename CallbackWithReturnValue<ReturnValue>::Type*
249 NewCallbackWithReturnValue(T* object, ReturnValue (T::*method)()) { 249 NewCallbackWithReturnValue(T* object, ReturnValue (T::*method)()) {
250 return new CallbackWithReturnValueImpl<T, ReturnValue (T::*)(), ReturnValue>( 250 return new CallbackWithReturnValueImpl<T, ReturnValue (T::*)(), ReturnValue>(
251 object, method); 251 object, method);
252 } 252 }
253 253
254 #endif // BASE_CALLBACK_OLD_H_ 254 #endif // BASE_CALLBACK_OLD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698