summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gpu_process_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gpu_process_host.cc')
-rw-r--r--chrome/browser/gpu_process_host.cc25
1 files changed, 21 insertions, 4 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc
index 8e2242e..3825c2f 100644
--- a/chrome/browser/gpu_process_host.cc
+++ b/chrome/browser/gpu_process_host.cc
@@ -91,6 +91,7 @@ bool GpuProcessHost::Init() {
// Propagate relevant command line switches.
static const char* const kSwitchNames[] = {
switches::kUseGL,
+ switches::kDisableGpuWatchdog,
switches::kDisableLogging,
switches::kEnableLogging,
switches::kGpuStartupDialog,
@@ -122,14 +123,18 @@ GpuProcessHost* GpuProcessHost::Get() {
return sole_instance_;
}
-// static
void GpuProcessHost::SendAboutGpuCrash() {
- Get()->Send(new GpuMsg_Crash());
+ ChromeThread::PostTask(
+ ChromeThread::IO,
+ FROM_HERE,
+ NewRunnableFunction(&GpuProcessHost::SendAboutGpuCrashInternal));
}
-// static
void GpuProcessHost::SendAboutGpuHang() {
- Get()->Send(new GpuMsg_Hang());
+ ChromeThread::PostTask(
+ ChromeThread::IO,
+ FROM_HERE,
+ NewRunnableFunction(&GpuProcessHost::SendAboutGpuHangInternal));
}
bool GpuProcessHost::Send(IPC::Message* msg) {
@@ -348,3 +353,15 @@ URLRequestContext* GpuProcessHost::GetRequestContext(
bool GpuProcessHost::CanShutdown() {
return true;
}
+
+// static
+void GpuProcessHost::SendAboutGpuCrashInternal() {
+ DCHECK(Get());
+ Get()->Send(new GpuMsg_Crash());
+}
+
+// static
+void GpuProcessHost::SendAboutGpuHangInternal() {
+ DCHECK(Get());
+ Get()->Send(new GpuMsg_Hang());
+}