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_GPU_GPU_MAIN_THREAD_H_ |
| 6 #define CONTENT_GPU_GPU_MAIN_THREAD_H_ |
| 7 |
| 8 #include "base/threading/thread.h" |
| 9 #include "content/common/content_export.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class GpuProcess; |
| 14 |
| 15 // This class creates a GPU thread (instead of a GPU process), when running |
| 16 // with --in-process-gpu or --single-process. |
| 17 class GpuMainThread : public base::Thread { |
| 18 public: |
| 19 explicit GpuMainThread(const std::string& channel_id); |
| 20 virtual ~GpuMainThread(); |
| 21 |
| 22 protected: |
| 23 virtual void Init() OVERRIDE; |
| 24 virtual void CleanUp() OVERRIDE; |
| 25 |
| 26 private: |
| 27 std::string channel_id_; |
| 28 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. |
| 29 GpuProcess* gpu_process_; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(GpuMainThread); |
| 32 }; |
| 33 |
| 34 CONTENT_EXPORT base::Thread* CreateGpuMainThread(const std::string& channel_id); |
| 35 |
| 36 } // namespace content |
| 37 |
| 38 #endif // CONTENT_GPU_GPU_MAIN_THREAD_H_ |
OLD | NEW |