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

Side by Side Diff: content/browser/gpu/gpu_process_host.h

Issue 9212054: Fix DirectX diagnostic collection for about:gpu page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
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_BROWSER_GPU_GPU_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void CreateViewCommandBuffer( 73 void CreateViewCommandBuffer(
74 gfx::PluginWindowHandle compositing_surface, 74 gfx::PluginWindowHandle compositing_surface,
75 int surface_id, 75 int surface_id,
76 int client_id, 76 int client_id,
77 const GPUCreateCommandBufferConfig& init_params, 77 const GPUCreateCommandBufferConfig& init_params,
78 const CreateCommandBufferCallback& callback); 78 const CreateCommandBufferCallback& callback);
79 79
80 // Whether this GPU process is set up to use software rendering. 80 // Whether this GPU process is set up to use software rendering.
81 bool software_rendering(); 81 bool software_rendering();
82 82
83 // Whether this GPU process is sandboxed.
84 bool sandboxed();
85
83 void ForceShutdown(); 86 void ForceShutdown();
84 87
85 private: 88 private:
86 static bool HostIsValid(GpuProcessHost* host); 89 static bool HostIsValid(GpuProcessHost* host);
87 90
88 GpuProcessHost(int host_id); 91 GpuProcessHost(int host_id, bool sandboxed);
89 virtual ~GpuProcessHost(); 92 virtual ~GpuProcessHost();
90 93
91 bool Init(); 94 bool Init();
92 95
93 // Post an IPC message to the UI shim's message handler on the UI thread. 96 // Post an IPC message to the UI shim's message handler on the UI thread.
94 void RouteOnUIThread(const IPC::Message& message); 97 void RouteOnUIThread(const IPC::Message& message);
95 98
96 // BrowserChildProcessHostDelegate implementation. 99 // BrowserChildProcessHostDelegate implementation.
97 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 100 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
98 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 101 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 std::queue<IPC::Message*> queued_messages_; 145 std::queue<IPC::Message*> queued_messages_;
143 146
144 // The handle for the GPU process or null if it is not known to be launched. 147 // The handle for the GPU process or null if it is not known to be launched.
145 base::ProcessHandle gpu_process_; 148 base::ProcessHandle gpu_process_;
146 149
147 // Whether we are running a GPU thread inside the browser process instead 150 // Whether we are running a GPU thread inside the browser process instead
148 // of a separate GPU process. 151 // of a separate GPU process.
149 bool in_process_; 152 bool in_process_;
150 153
151 bool software_rendering_; 154 bool software_rendering_;
155 bool sandboxed_;
152 156
153 scoped_ptr<GpuMainThread> in_process_gpu_thread_; 157 scoped_ptr<GpuMainThread> in_process_gpu_thread_;
154 158
155 // Master switch for enabling/disabling GPU acceleration for the current 159 // Master switch for enabling/disabling GPU acceleration for the current
156 // browser session. It does not change the acceleration settings for 160 // browser session. It does not change the acceleration settings for
157 // existing tabs, just the future ones. 161 // existing tabs, just the future ones.
158 CONTENT_EXPORT static bool gpu_enabled_; 162 CONTENT_EXPORT static bool gpu_enabled_;
159 163
160 scoped_ptr<BrowserChildProcessHost> process_; 164 scoped_ptr<BrowserChildProcessHost> process_;
161 165
162 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 166 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
163 }; 167 };
164 168
165 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 169 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698