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

Side by Side Diff: base/sequenced_task_runner.h

Issue 9427023: Add functions to expand PostDelayedTask interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add fix to RunOnPluginThread() in host_plugin.cc Created 8 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 unified diff | Download patch
« no previous file with comments | « base/message_loop_proxy_impl.cc ('k') | base/task_runner.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SEQUENCED_TASKRUNNER_H_ 5 #ifndef BASE_SEQUENCED_TASKRUNNER_H_
6 #define BASE_SEQUENCED_TASKRUNNER_H_ 6 #define BASE_SEQUENCED_TASKRUNNER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/base_export.h" 9 #include "base/base_export.h"
10 #include "base/sequenced_task_runner_helpers.h" 10 #include "base/sequenced_task_runner_helpers.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // below. 109 // below.
110 110
111 bool PostNonNestableTask(const tracked_objects::Location& from_here, 111 bool PostNonNestableTask(const tracked_objects::Location& from_here,
112 const Closure& task); 112 const Closure& task);
113 113
114 virtual bool PostNonNestableDelayedTask( 114 virtual bool PostNonNestableDelayedTask(
115 const tracked_objects::Location& from_here, 115 const tracked_objects::Location& from_here,
116 const Closure& task, 116 const Closure& task,
117 int64 delay_ms) = 0; 117 int64 delay_ms) = 0;
118 118
119 virtual bool PostNonNestableDelayedTask(
120 const tracked_objects::Location& from_here,
121 const Closure& task,
122 base::TimeDelta delay) = 0;
123
119 // Submits a non-nestable task to delete the given object. Returns 124 // Submits a non-nestable task to delete the given object. Returns
120 // true if the object may be deleted at some point in the future, 125 // true if the object may be deleted at some point in the future,
121 // and false if the object definitely will not be deleted. 126 // and false if the object definitely will not be deleted.
122 template <class T> 127 template <class T>
123 bool DeleteSoon(const tracked_objects::Location& from_here, 128 bool DeleteSoon(const tracked_objects::Location& from_here,
124 const T* object) { 129 const T* object) {
125 return 130 return
126 subtle::DeleteHelperInternal<T, bool>::DeleteViaSequencedTaskRunner( 131 subtle::DeleteHelperInternal<T, bool>::DeleteViaSequencedTaskRunner(
127 this, from_here, object); 132 this, from_here, object);
128 } 133 }
(...skipping 18 matching lines...) Expand all
147 const void* object); 152 const void* object);
148 153
149 bool ReleaseSoonInternal(const tracked_objects::Location& from_here, 154 bool ReleaseSoonInternal(const tracked_objects::Location& from_here,
150 void(*releaser)(const void*), 155 void(*releaser)(const void*),
151 const void* object); 156 const void* object);
152 }; 157 };
153 158
154 } // namespace base 159 } // namespace base
155 160
156 #endif // BASE_SEQUENCED_TASKRUNNER_H_ 161 #endif // BASE_SEQUENCED_TASKRUNNER_H_
OLDNEW
« no previous file with comments | « base/message_loop_proxy_impl.cc ('k') | base/task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698