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

Unified Diff: content/browser/gpu/gpu_process_host.h

Issue 23235002: Set up content in-process main threads via factory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host.h
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 8908a1035db4021ccd27c4978833dfcaf3908274..32345b728004ebb1ee017b1268b425e65143ed2d 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -44,6 +44,8 @@ class GpuMainThread;
class RenderWidgetHostViewFrameSubscriber;
class ShaderDiskCache;
+typedef base::Thread* (*GpuMainThreadFactoryFunction)(const std::string& id);
+
class GpuProcessHost : public BrowserChildProcessHostDelegate,
public IPC::Sender,
public base::NonThreadSafe {
@@ -82,6 +84,9 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
CauseForGpuLaunch cause,
IPC::Message* message);
+ CONTENT_EXPORT static void RegisterGpuMainThreadFactory(
+ GpuMainThreadFactoryFunction create);
+
// Get the GPU process host for the GPU process with the given ID. Returns
// null if the process no longer exists.
static GpuProcessHost* FromID(int host_id);
@@ -214,9 +219,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
bool swiftshader_rendering_;
GpuProcessKind kind_;
-#if !defined(CHROME_MULTIPLE_DLL)
- scoped_ptr<GpuMainThread> in_process_gpu_thread_;
-#endif
+ scoped_ptr<base::Thread> in_process_gpu_thread_;
// Whether we actually launched a GPU process.
bool process_launched_;

Powered by Google App Engine
This is Rietveld 408576698