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

Side by Side Diff: media/base/callback.h

Issue 1561020: Hierarchy. Hierarchy. Hierarchy!!! (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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
« no previous file with comments | « chrome/browser/views/generic_info_view.cc ('k') | o3d/samples/manipulators/manipsample.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Some basic utilities for aiding in the management of Tasks and Callbacks. 5 // Some basic utilities for aiding in the management of Tasks and Callbacks.
6 // 6 //
7 // AutoTaskRunner, and its brother AutoCallbackRunner are the scoped_ptr 7 // AutoTaskRunner, and its brother AutoCallbackRunner are the scoped_ptr
8 // equivalents for callbacks. They are useful for ensuring a callback is 8 // equivalents for callbacks. They are useful for ensuring a callback is
9 // executed and delete in the face of multiple return points in a function. 9 // executed and delete in the face of multiple return points in a function.
10 // 10 //
11 // TaskToCallbackAdapter converts a Task to a Callback0::Type since the two type 11 // TaskToCallbackAdapter converts a Task to a Callback0::Type since the two type
12 // heirarchies are strangely separate. 12 // hierarchies are strangely separate.
13 // 13 //
14 // CleanupCallback wraps another Callback and provides the ability to register 14 // CleanupCallback wraps another Callback and provides the ability to register
15 // objects for deletion as well as cleanup tasks that will be run on the 15 // objects for deletion as well as cleanup tasks that will be run on the
16 // callback's destruction. The deletion and cleanup tasks will be run on 16 // callback's destruction. The deletion and cleanup tasks will be run on
17 // whatever thread the CleanupCallback is destroyed in. 17 // whatever thread the CleanupCallback is destroyed in.
18 18
19 #ifndef MEDIA_BASE_CALLBACK_ 19 #ifndef MEDIA_BASE_CALLBACK_
20 #define MEDIA_BASE_CALLBACK_ 20 #define MEDIA_BASE_CALLBACK_
21 21
22 #include <vector> 22 #include <vector>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 private: 115 private:
116 scoped_ptr<CallbackType> callback_; 116 scoped_ptr<CallbackType> callback_;
117 std::vector<Task*> run_when_done_; 117 std::vector<Task*> run_when_done_;
118 118
119 DISALLOW_COPY_AND_ASSIGN(CleanupCallback); 119 DISALLOW_COPY_AND_ASSIGN(CleanupCallback);
120 }; 120 };
121 121
122 } // namespace media 122 } // namespace media
123 123
124 #endif // MEDIA_BASE_CALLBACK_ 124 #endif // MEDIA_BASE_CALLBACK_
OLDNEW
« no previous file with comments | « chrome/browser/views/generic_info_view.cc ('k') | o3d/samples/manipulators/manipsample.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698