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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 2723013004: gpu: Replace more chrome ipc with mojom API. (Closed)
Patch Set: tot merge Created 3 years, 10 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
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.h ('k') | content/common/gpu_host_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host_ui_shim.cc
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index f8fe86b4ef0f462ac5fef0ce32244cabd1faf000..a6621066ba704359794cd7071b82cbb8b4dec8b4 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -43,14 +43,6 @@ namespace {
base::LazyInstance<IDMap<GpuProcessHostUIShim*>> g_hosts_by_id =
LAZY_INSTANCE_INITIALIZER;
-void SendOnIOThreadTask(int host_id, IPC::Message* msg) {
- GpuProcessHost* host = GpuProcessHost::FromID(host_id);
- if (host)
- host->Send(msg);
- else
- delete msg;
-}
-
void StopGpuProcessOnIO(int host_id) {
GpuProcessHost* host = GpuProcessHost::FromID(host_id);
if (host)
@@ -113,24 +105,6 @@ GpuProcessHostUIShim* GpuProcessHostUIShim::FromID(int host_id) {
return g_hosts_by_id.Pointer()->Lookup(host_id);
}
-// static
-GpuProcessHostUIShim* GpuProcessHostUIShim::GetOneInstance() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (g_hosts_by_id.Pointer()->IsEmpty())
- return NULL;
- IDMap<GpuProcessHostUIShim*>::iterator it(g_hosts_by_id.Pointer());
- return it.GetCurrentValue();
-}
-
-bool GpuProcessHostUIShim::Send(IPC::Message* msg) {
- DCHECK(CalledOnValidThread());
- return BrowserThread::PostTask(BrowserThread::IO,
- FROM_HERE,
- base::Bind(&SendOnIOThreadTask,
- host_id_,
- msg));
-}
-
bool GpuProcessHostUIShim::OnMessageReceived(const IPC::Message& message) {
DCHECK(CalledOnValidThread());
@@ -154,24 +128,6 @@ void GpuProcessHostUIShim::StopGpuProcess(const base::Closure& callback) {
BrowserThread::IO, FROM_HERE, base::Bind(&StopGpuProcessOnIO, host_id_));
}
-void GpuProcessHostUIShim::SimulateRemoveAllContext() {
- Send(new GpuMsg_Clean());
-}
-
-void GpuProcessHostUIShim::SimulateCrash() {
- Send(new GpuMsg_Crash());
-}
-
-void GpuProcessHostUIShim::SimulateHang() {
- Send(new GpuMsg_Hang());
-}
-
-#if defined(OS_ANDROID)
-void GpuProcessHostUIShim::SimulateJavaCrash() {
- Send(new GpuMsg_JavaCrash());
-}
-#endif
-
GpuProcessHostUIShim::~GpuProcessHostUIShim() {
DCHECK(CalledOnValidThread());
if (!close_callback_.is_null())
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.h ('k') | content/common/gpu_host_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698