OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_RENDERER_MAIN_THREAD_H_ |
| 6 #define CONTENT_RENDERER_RENDERER_MAIN_THREAD_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/threading/thread.h" |
| 11 |
| 12 namespace content { |
| 13 class RenderProcess; |
| 14 |
| 15 // This class creates the IO thread for the renderer when running in |
| 16 // single-process mode. It's not used in multi-process mode. |
| 17 class RendererMainThread : public base::Thread { |
| 18 public: |
| 19 explicit RendererMainThread(const std::string& channel_id); |
| 20 virtual ~RendererMainThread(); |
| 21 |
| 22 protected: |
| 23 virtual void Init() OVERRIDE; |
| 24 virtual void CleanUp() OVERRIDE; |
| 25 |
| 26 private: |
| 27 std::string channel_id_; |
| 28 scoped_ptr<RenderProcess> render_process_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(RendererMainThread); |
| 31 }; |
| 32 |
| 33 base::Thread* CreateRendererMainThread(const std::string& channel_id); |
| 34 |
| 35 } // namespace content |
| 36 |
| 37 #endif // CONTENT_RENDERER_RENDERER_MAIN_THREAD_H_ |
OLD | NEW |