Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: content/gpu/gpu_child_thread.h

Issue 15385003: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/gpu/DEPS ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GPU_GPU_CHILD_THREAD_H_ 5 #ifndef CONTENT_GPU_GPU_CHILD_THREAD_H_
6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/common/child_thread.h" 16 #include "content/common/child_thread.h"
17 #include "content/common/gpu/gpu_channel.h" 17 #include "content/common/gpu/gpu_channel.h"
18 #include "content/common/gpu/gpu_channel_manager.h" 18 #include "content/common/gpu/gpu_channel_manager.h"
19 #include "content/common/gpu/gpu_config.h" 19 #include "content/common/gpu/gpu_config.h"
20 #include "content/common/gpu/x_util.h" 20 #include "content/common/gpu/x_util.h"
21 #include "content/public/common/gpu_info.h" 21 #include "gpu/config/gpu_info.h"
22 #include "ui/gfx/native_widget_types.h" 22 #include "ui/gfx/native_widget_types.h"
23 23
24 namespace sandbox { 24 namespace sandbox {
25 class TargetServices; 25 class TargetServices;
26 } 26 }
27 27
28 namespace content { 28 namespace content {
29 class GpuWatchdogThread; 29 class GpuWatchdogThread;
30 30
31 // The main thread of the GPU child process. There will only ever be one of 31 // The main thread of the GPU child process. There will only ever be one of
32 // these per process. It does process initialization and shutdown. It forwards 32 // these per process. It does process initialization and shutdown. It forwards
33 // IPC messages to GpuChannelManager, which is responsible for issuing rendering 33 // IPC messages to GpuChannelManager, which is responsible for issuing rendering
34 // commands to the GPU. 34 // commands to the GPU.
35 class GpuChildThread : public ChildThread { 35 class GpuChildThread : public ChildThread {
36 public: 36 public:
37 explicit GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread, 37 explicit GpuChildThread(GpuWatchdogThread* gpu_watchdog_thread,
38 bool dead_on_arrival, 38 bool dead_on_arrival,
39 const GPUInfo& gpu_info); 39 const gpu::GPUInfo& gpu_info);
40 40
41 // For single-process mode. 41 // For single-process mode.
42 explicit GpuChildThread(const std::string& channel_id); 42 explicit GpuChildThread(const std::string& channel_id);
43 43
44 virtual ~GpuChildThread(); 44 virtual ~GpuChildThread();
45 45
46 virtual void Shutdown() OVERRIDE; 46 virtual void Shutdown() OVERRIDE;
47 47
48 void Init(const base::Time& process_start_time); 48 void Init(const base::Time& process_start_time);
49 void StopWatchdog(); 49 void StopWatchdog();
(...skipping 25 matching lines...) Expand all
75 scoped_refptr<GpuWatchdogThread> watchdog_thread_; 75 scoped_refptr<GpuWatchdogThread> watchdog_thread_;
76 76
77 #if defined(OS_WIN) 77 #if defined(OS_WIN)
78 // Windows specific client sandbox interface. 78 // Windows specific client sandbox interface.
79 sandbox::TargetServices* target_services_; 79 sandbox::TargetServices* target_services_;
80 #endif 80 #endif
81 81
82 scoped_ptr<GpuChannelManager> gpu_channel_manager_; 82 scoped_ptr<GpuChannelManager> gpu_channel_manager_;
83 83
84 // Information about the GPU, such as device and vendor ID. 84 // Information about the GPU, such as device and vendor ID.
85 GPUInfo gpu_info_; 85 gpu::GPUInfo gpu_info_;
86 86
87 // Whether the GPU thread is running in the browser process. 87 // Whether the GPU thread is running in the browser process.
88 bool in_browser_process_; 88 bool in_browser_process_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 90 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
91 }; 91 };
92 92
93 } // namespace content 93 } // namespace content
94 94
95 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 95 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/gpu/DEPS ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698