OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 static bool PostTaskAndReply( | 138 static bool PostTaskAndReply( |
139 ID identifier, | 139 ID identifier, |
140 const tracked_objects::Location& from_here, | 140 const tracked_objects::Location& from_here, |
141 const base::Closure& task, | 141 const base::Closure& task, |
142 const base::Closure& reply); | 142 const base::Closure& reply); |
143 | 143 |
144 template <class T> | 144 template <class T> |
145 static bool DeleteSoon(ID identifier, | 145 static bool DeleteSoon(ID identifier, |
146 const tracked_objects::Location& from_here, | 146 const tracked_objects::Location& from_here, |
147 const T* object) { | 147 const T* object) { |
148 return PostNonNestableTask( | 148 return GetMessageLoopProxyForThread(identifier)->DeleteSoon( |
149 identifier, from_here, new DeleteTask<T>(object)); | 149 from_here, object); |
150 } | 150 } |
151 | 151 |
152 template <class T> | 152 template <class T> |
153 static bool ReleaseSoon(ID identifier, | 153 static bool ReleaseSoon(ID identifier, |
154 const tracked_objects::Location& from_here, | 154 const tracked_objects::Location& from_here, |
155 const T* object) { | 155 const T* object) { |
156 return GetMessageLoopProxyForThread(identifier)->ReleaseSoon( | 156 return GetMessageLoopProxyForThread(identifier)->ReleaseSoon( |
157 from_here, object); | 157 from_here, object); |
158 } | 158 } |
159 | 159 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 private: | 244 private: |
245 friend class BrowserThreadImpl; | 245 friend class BrowserThreadImpl; |
246 | 246 |
247 BrowserThread() {} | 247 BrowserThread() {} |
248 DISALLOW_COPY_AND_ASSIGN(BrowserThread); | 248 DISALLOW_COPY_AND_ASSIGN(BrowserThread); |
249 }; | 249 }; |
250 | 250 |
251 } // namespace content | 251 } // namespace content |
252 | 252 |
253 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 253 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
OLD | NEW |