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

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

Issue 1297953004: Support mojo applications in GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix in-process-gpu case Created 5 years, 2 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
« no previous file with comments | « content/gpu/BUILD.gn ('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 <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "content/child/child_thread_impl.h" 17 #include "content/child/child_thread_impl.h"
18 #include "content/common/gpu/gpu_channel.h" 18 #include "content/common/gpu/gpu_channel.h"
19 #include "content/common/gpu/gpu_channel_manager.h" 19 #include "content/common/gpu/gpu_channel_manager.h"
20 #include "content/common/gpu/gpu_config.h" 20 #include "content/common/gpu/gpu_config.h"
21 #include "content/common/gpu/x_util.h" 21 #include "content/common/gpu/x_util.h"
22 #include "content/gpu/gpu_process_control_impl.h"
Ken Rockot(use gerrit already) 2015/10/02 21:34:51 nit: could just forward declare this?
xhwang 2015/10/02 22:07:48 Done.
22 #include "gpu/config/gpu_info.h" 23 #include "gpu/config/gpu_info.h"
24 #include "mojo/common/weak_binding_set.h"
23 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
24 26
25 namespace gpu { 27 namespace gpu {
26 class SyncPointManager; 28 class SyncPointManager;
27 } 29 }
28 30
29 namespace sandbox { 31 namespace sandbox {
30 class TargetServices; 32 class TargetServices;
31 } 33 }
32 34
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void OnClean(); 80 void OnClean();
79 void OnCrash(); 81 void OnCrash();
80 void OnHang(); 82 void OnHang();
81 void OnDisableWatchdog(); 83 void OnDisableWatchdog();
82 void OnGpuSwitched(); 84 void OnGpuSwitched();
83 85
84 #if defined(USE_TCMALLOC) 86 #if defined(USE_TCMALLOC)
85 void OnGetGpuTcmalloc(); 87 void OnGetGpuTcmalloc();
86 #endif 88 #endif
87 89
90 void BindProcessControlRequest(
91 mojo::InterfaceRequest<ProcessControl> request);
92
88 // Set this flag to true if a fatal error occurred before we receive the 93 // Set this flag to true if a fatal error occurred before we receive the
89 // OnInitialize message, in which case we just declare ourselves DOA. 94 // OnInitialize message, in which case we just declare ourselves DOA.
90 bool dead_on_arrival_; 95 bool dead_on_arrival_;
91 base::Time process_start_time_; 96 base::Time process_start_time_;
92 scoped_refptr<GpuWatchdogThread> watchdog_thread_; 97 scoped_refptr<GpuWatchdogThread> watchdog_thread_;
93 98
94 #if defined(OS_WIN) 99 #if defined(OS_WIN)
95 // Windows specific client sandbox interface. 100 // Windows specific client sandbox interface.
96 sandbox::TargetServices* target_services_; 101 sandbox::TargetServices* target_services_;
97 #endif 102 #endif
98 103
99 // Non-owning. 104 // Non-owning.
100 gpu::SyncPointManager* sync_point_manager_; 105 gpu::SyncPointManager* sync_point_manager_;
101 106
102 scoped_ptr<GpuChannelManager> gpu_channel_manager_; 107 scoped_ptr<GpuChannelManager> gpu_channel_manager_;
103 108
104 // Information about the GPU, such as device and vendor ID. 109 // Information about the GPU, such as device and vendor ID.
105 gpu::GPUInfo gpu_info_; 110 gpu::GPUInfo gpu_info_;
106 111
107 // Error messages collected in gpu_main() before the thread is created. 112 // Error messages collected in gpu_main() before the thread is created.
108 DeferredMessages deferred_messages_; 113 DeferredMessages deferred_messages_;
109 114
110 // Whether the GPU thread is running in the browser process. 115 // Whether the GPU thread is running in the browser process.
111 bool in_browser_process_; 116 bool in_browser_process_;
112 117
113 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. 118 // The GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers.
114 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 119 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
115 120
121 // Process control for Mojo application hosting.
122 scoped_ptr<GpuProcessControlImpl> process_control_;
123
124 // Bindings to the ProcessControl impl.
125 mojo::WeakBindingSet<ProcessControl> process_control_bindings_;
126
116 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 127 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
117 }; 128 };
118 129
119 } // namespace content 130 } // namespace content
120 131
121 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 132 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/gpu/BUILD.gn ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698