| 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_BROWSER_BROWSER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ | 6 #define CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/common/content_export.h" |
| 9 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 class BrowserThreadImpl : public BrowserThread { | 14 class CONTENT_EXPORT BrowserThreadImpl : public BrowserThread { |
| 14 public: | 15 public: |
| 15 explicit BrowserThreadImpl(BrowserThread::ID identifier); | 16 explicit BrowserThreadImpl(BrowserThread::ID identifier); |
| 16 BrowserThreadImpl(BrowserThread::ID identifier, MessageLoop* message_loop); | 17 BrowserThreadImpl(BrowserThread::ID identifier, MessageLoop* message_loop); |
| 17 virtual ~BrowserThreadImpl(); | 18 virtual ~BrowserThreadImpl(); |
| 18 | 19 |
| 19 private: | 20 private: |
| 20 // We implement most functionality on the public set of | 21 // We implement most functionality on the public set of |
| 21 // BrowserThread functions, but state is stored in the | 22 // BrowserThread functions, but state is stored in the |
| 22 // BrowserThreadImpl to keep the public API cleaner. Therefore make | 23 // BrowserThreadImpl to keep the public API cleaner. Therefore make |
| 23 // BrowserThread a friend class. | 24 // BrowserThread a friend class. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 44 // An array of the BrowserThread objects. This array is protected by |lock_|. | 45 // An array of the BrowserThread objects. This array is protected by |lock_|. |
| 45 // The threads are not owned by this array. Typically, the threads are owned | 46 // The threads are not owned by this array. Typically, the threads are owned |
| 46 // on the UI thread by the g_browser_process object. BrowserThreads remove | 47 // on the UI thread by the g_browser_process object. BrowserThreads remove |
| 47 // themselves from this array upon destruction. | 48 // themselves from this array upon destruction. |
| 48 static BrowserThread* browser_threads_[ID_COUNT]; | 49 static BrowserThread* browser_threads_[ID_COUNT]; |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 } // namespace content | 52 } // namespace content |
| 52 | 53 |
| 53 #endif // CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ | 54 #endif // CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ |
| OLD | NEW |