OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UTILITY_IN_PROCESS_UTILITY_THREAD_H_ | 5 #ifndef CONTENT_UTILITY_IN_PROCESS_UTILITY_THREAD_H_ |
6 #define CONTENT_UTILITY_IN_PROCESS_UTILITY_THREAD_H_ | 6 #define CONTENT_UTILITY_IN_PROCESS_UTILITY_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class ChildProcess; | 15 class ChildProcess; |
16 | 16 |
17 class InProcessUtilityThread : public base::Thread { | 17 class InProcessUtilityThread : public base::Thread { |
18 public: | 18 public: |
19 InProcessUtilityThread(const std::string& channel_id); | 19 InProcessUtilityThread(const std::string& channel_id); |
20 virtual ~InProcessUtilityThread(); | 20 virtual ~InProcessUtilityThread(); |
21 | 21 |
22 private: | 22 private: |
23 // base::Thread implementation: | 23 // base::Thread implementation: |
24 virtual void Init() OVERRIDE; | 24 virtual void Init() override; |
25 virtual void CleanUp() OVERRIDE; | 25 virtual void CleanUp() override; |
26 | 26 |
27 void InitInternal(); | 27 void InitInternal(); |
28 | 28 |
29 std::string channel_id_; | 29 std::string channel_id_; |
30 scoped_ptr<ChildProcess> child_process_; | 30 scoped_ptr<ChildProcess> child_process_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(InProcessUtilityThread); | 32 DISALLOW_COPY_AND_ASSIGN(InProcessUtilityThread); |
33 }; | 33 }; |
34 | 34 |
35 CONTENT_EXPORT base::Thread* CreateInProcessUtilityThread( | 35 CONTENT_EXPORT base::Thread* CreateInProcessUtilityThread( |
36 const std::string& channel_id); | 36 const std::string& channel_id); |
37 | 37 |
38 } // namespace content | 38 } // namespace content |
39 | 39 |
40 #endif // CONTENT_UTILITY_IN_PROCESS_UTILITY_THREAD_H_ | 40 #endif // CONTENT_UTILITY_IN_PROCESS_UTILITY_THREAD_H_ |
OLD | NEW |