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

Unified Diff: content/browser/frame_host/debug_urls.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 | « no previous file | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/debug_urls.cc
diff --git a/content/browser/frame_host/debug_urls.cc b/content/browser/frame_host/debug_urls.cc
index c69307838e8e0b4e7e0439cb238495c130732085..a3fae243342f5cbddb0d313c4cb8e32373975ce6 100644
--- a/content/browser/frame_host/debug_urls.cc
+++ b/content/browser/frame_host/debug_urls.cc
@@ -17,7 +17,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_restrictions.h"
#include "cc/base/switches.h"
-#include "content/browser/gpu/gpu_process_host_ui_shim.h"
+#include "content/browser/gpu/gpu_process_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/url_constants.h"
@@ -167,32 +167,36 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
}
if (url == kChromeUIGpuCleanURL) {
- GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
- if (shim)
- shim->SimulateRemoveAllContext();
+ GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+ false /* force_create */,
+ base::Bind([](GpuProcessHost* host) {
+ host->gpu_service()->DestroyAllChannels();
+ }));
return true;
}
if (url == kChromeUIGpuCrashURL) {
- GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
- if (shim)
- shim->SimulateCrash();
+ GpuProcessHost::CallOnIO(
+ GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false /* force_create */,
+ base::Bind([](GpuProcessHost* host) { host->gpu_service()->Crash(); }));
return true;
}
#if defined(OS_ANDROID)
if (url == kChromeUIGpuJavaCrashURL) {
- GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
- if (shim)
- shim->SimulateJavaCrash();
+ GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+ false /* force_create */,
+ base::Bind([](GpuProcessHost* host) {
+ host->gpu_service()->ThrowJavaException();
+ }));
return true;
}
#endif
if (url == kChromeUIGpuHangURL) {
- GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
- if (shim)
- shim->SimulateHang();
+ GpuProcessHost::CallOnIO(
+ GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false /* force_create */,
+ base::Bind([](GpuProcessHost* host) { host->gpu_service()->Hang(); }));
return true;
}
« no previous file with comments | « no previous file | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698