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

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

Issue 2723013004: gpu: Replace more chrome ipc with mojom API. (Closed)
Patch Set: tot merge Created 3 years, 9 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // be set to force the creation of GpuProcessHost if one doesn't already 96 // be set to force the creation of GpuProcessHost if one doesn't already
97 // exist. This function can be called from any thread. Deletes the message if 97 // exist. This function can be called from any thread. Deletes the message if
98 // it cannot be sent. 98 // it cannot be sent.
99 CONTENT_EXPORT static void SendOnIO(GpuProcessKind kind, 99 CONTENT_EXPORT static void SendOnIO(GpuProcessKind kind,
100 bool force_create, 100 bool force_create,
101 IPC::Message* message); 101 IPC::Message* message);
102 102
103 // Helper function to run a callback on the IO thread. The callback receives 103 // Helper function to run a callback on the IO thread. The callback receives
104 // the appropriate GpuProcessHost instance. If |force_create| is false, and no 104 // the appropriate GpuProcessHost instance. If |force_create| is false, and no
105 // GpuProcessHost instance exists, then the callback is never called. 105 // GpuProcessHost instance exists, then the callback is never called.
106 static void CallOnIO(GpuProcessKind kind, 106 CONTENT_EXPORT static void CallOnIO(
107 bool force_create, 107 GpuProcessKind kind,
108 const base::Callback<void(GpuProcessHost*)>& callback); 108 bool force_create,
109 const base::Callback<void(GpuProcessHost*)>& callback);
109 110
110 service_manager::InterfaceProvider* GetRemoteInterfaces(); 111 service_manager::InterfaceProvider* GetRemoteInterfaces();
111 112
112 // Get the GPU process host for the GPU process with the given ID. Returns 113 // Get the GPU process host for the GPU process with the given ID. Returns
113 // null if the process no longer exists. 114 // null if the process no longer exists.
114 static GpuProcessHost* FromID(int host_id); 115 static GpuProcessHost* FromID(int host_id);
115 int host_id() const { return host_id_; } 116 int host_id() const { return host_id_; }
116 117
117 // IPC::Sender implementation. 118 // IPC::Sender implementation.
118 bool Send(IPC::Message* msg) override; 119 bool Send(IPC::Message* msg) override;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 mojo::Binding<ui::mojom::GpuHost> gpu_host_binding_; 298 mojo::Binding<ui::mojom::GpuHost> gpu_host_binding_;
298 299
299 base::WeakPtrFactory<GpuProcessHost> weak_ptr_factory_; 300 base::WeakPtrFactory<GpuProcessHost> weak_ptr_factory_;
300 301
301 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 302 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
302 }; 303 };
303 304
304 } // namespace content 305 } // namespace content
305 306
306 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 307 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_ipc_browsertests.cc ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698