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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
11 #include "base/task.h" | 11 #include "base/task.h" |
12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 | 14 |
15 #if defined(UNIT_TEST) | 15 #if defined(UNIT_TEST) |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #endif // UNIT_TEST | 17 #endif // UNIT_TEST |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class MessageLoopProxy; | 20 class MessageLoopProxy; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
| 24 |
24 class BrowserThreadImpl; | 25 class BrowserThreadImpl; |
25 } | |
26 | |
27 class DeprecatedBrowserThread; | 26 class DeprecatedBrowserThread; |
28 | 27 |
29 /////////////////////////////////////////////////////////////////////////////// | 28 /////////////////////////////////////////////////////////////////////////////// |
30 // BrowserThread | 29 // BrowserThread |
31 // | 30 // |
32 // Utility functions for threads that are known by a browser-wide | 31 // Utility functions for threads that are known by a browser-wide |
33 // name. For example, there is one IO thread for the entire browser | 32 // name. For example, there is one IO thread for the entire browser |
34 // process, and various pieces of code find it useful to retrieve a | 33 // process, and various pieces of code find it useful to retrieve a |
35 // pointer to the IO thread's message loop. | 34 // pointer to the IO thread's message loop. |
36 // | 35 // |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // Temporary escape hatch for chrome/ to construct BrowserThread, | 242 // Temporary escape hatch for chrome/ to construct BrowserThread, |
244 // until we make content/ construct its own threads. | 243 // until we make content/ construct its own threads. |
245 class DeprecatedBrowserThread : public BrowserThread { | 244 class DeprecatedBrowserThread : public BrowserThread { |
246 public: | 245 public: |
247 explicit DeprecatedBrowserThread(BrowserThread::ID identifier); | 246 explicit DeprecatedBrowserThread(BrowserThread::ID identifier); |
248 DeprecatedBrowserThread(BrowserThread::ID identifier, | 247 DeprecatedBrowserThread(BrowserThread::ID identifier, |
249 MessageLoop* message_loop); | 248 MessageLoop* message_loop); |
250 virtual ~DeprecatedBrowserThread(); | 249 virtual ~DeprecatedBrowserThread(); |
251 }; | 250 }; |
252 | 251 |
| 252 } // namespace content |
| 253 |
| 254 // TODO(joi): Remove these ASAP. |
| 255 using content::BrowserThread; |
| 256 using content::DeprecatedBrowserThread; |
| 257 |
253 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 258 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
OLD | NEW |