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

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

Issue 2096643002: Eliminate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mah3
Patch Set: . Created 4 years, 5 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
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 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 namespace gpu { 43 namespace gpu {
44 struct GpuPreferences; 44 struct GpuPreferences;
45 struct SyncToken; 45 struct SyncToken;
46 } 46 }
47 47
48 namespace content { 48 namespace content {
49 class BrowserChildProcessHostImpl; 49 class BrowserChildProcessHostImpl;
50 class GpuMainThread; 50 class GpuMainThread;
51 class InProcessChildThreadParams; 51 class InProcessChildThreadParams;
52 class MojoApplicationHost; 52 class MojoChildConnection;
53 class RenderWidgetHostViewFrameSubscriber; 53 class RenderWidgetHostViewFrameSubscriber;
54 class ShaderDiskCache; 54 class ShaderDiskCache;
55 55
56 typedef base::Thread* (*GpuMainThreadFactoryFunction)( 56 typedef base::Thread* (*GpuMainThreadFactoryFunction)(
57 const InProcessChildThreadParams&, const gpu::GpuPreferences&); 57 const InProcessChildThreadParams&, const gpu::GpuPreferences&);
58 58
59 class GpuProcessHost : public BrowserChildProcessHostDelegate, 59 class GpuProcessHost : public BrowserChildProcessHostDelegate,
60 public IPC::Sender, 60 public IPC::Sender,
61 public base::NonThreadSafe { 61 public base::NonThreadSafe {
62 public: 62 public:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // thread. Calls Get and if a host is returned, sends it. Can be called from 99 // thread. Calls Get and if a host is returned, sends it. Can be called from
100 // any thread. Deletes the message if it cannot be sent. 100 // any thread. Deletes the message if it cannot be sent.
101 CONTENT_EXPORT static void SendOnIO(GpuProcessKind kind, 101 CONTENT_EXPORT static void SendOnIO(GpuProcessKind kind,
102 CauseForGpuLaunch cause, 102 CauseForGpuLaunch cause,
103 IPC::Message* message); 103 IPC::Message* message);
104 104
105 CONTENT_EXPORT static void RegisterGpuMainThreadFactory( 105 CONTENT_EXPORT static void RegisterGpuMainThreadFactory(
106 GpuMainThreadFactoryFunction create); 106 GpuMainThreadFactoryFunction create);
107 107
108 // BrowserChildProcessHostDelegate implementation. 108 // BrowserChildProcessHostDelegate implementation.
109 ServiceRegistry* GetServiceRegistry() override; 109 shell::InterfaceRegistry* GetInterfaceRegistry() override;
110 shell::InterfaceProvider* GetRemoteInterfaces() override;
110 111
111 // Get the GPU process host for the GPU process with the given ID. Returns 112 // Get the GPU process host for the GPU process with the given ID. Returns
112 // null if the process no longer exists. 113 // null if the process no longer exists.
113 static GpuProcessHost* FromID(int host_id); 114 static GpuProcessHost* FromID(int host_id);
114 int host_id() const { return host_id_; } 115 int host_id() const { return host_id_; }
115 116
116 // IPC::Sender implementation. 117 // IPC::Sender implementation.
117 bool Send(IPC::Message* msg) override; 118 bool Send(IPC::Message* msg) override;
118 119
119 // Adds a message filter to the GpuProcessHost's channel. 120 // Adds a message filter to the GpuProcessHost's channel.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 bool uma_memory_stats_received_; 294 bool uma_memory_stats_received_;
294 gpu::GPUMemoryUmaStats uma_memory_stats_; 295 gpu::GPUMemoryUmaStats uma_memory_stats_;
295 296
296 typedef std::map<int32_t, scoped_refptr<ShaderDiskCache>> 297 typedef std::map<int32_t, scoped_refptr<ShaderDiskCache>>
297 ClientIdToShaderCacheMap; 298 ClientIdToShaderCacheMap;
298 ClientIdToShaderCacheMap client_id_to_shader_cache_; 299 ClientIdToShaderCacheMap client_id_to_shader_cache_;
299 300
300 std::string shader_prefix_key_; 301 std::string shader_prefix_key_;
301 302
302 // Browser-side Mojo endpoint which sets up a Mojo channel with the child 303 // Browser-side Mojo endpoint which sets up a Mojo channel with the child
303 // process and contains the browser's ServiceRegistry. 304 // process and contains the browser's shell::InterfaceRegistry.
304 const std::string child_token_; 305 const std::string child_token_;
305 std::unique_ptr<MojoApplicationHost> mojo_application_host_; 306 std::unique_ptr<MojoChildConnection> mojo_child_connection_;
306 307
307 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 308 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
308 }; 309 };
309 310
310 } // namespace content 311 } // namespace content
311 312
312 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 313 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698