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

Side by Side Diff: content/browser/frame_host/debug_urls.cc

Issue 2723363002: gpu: Replace GpuMsg_Finalize ipc with equivalent mojom api (Closed)
Patch Set: . 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
« no previous file with comments | « no previous file | content/browser/gpu/gpu_data_manager_impl_private.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/browser/frame_host/debug_urls.h" 5 #include "content/browser/frame_host/debug_urls.h"
6 6
7 #if defined(SYZYASAN) 7 #if defined(SYZYASAN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, 163 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE,
164 base::Bind(&HangCurrentThread), 164 base::Bind(&HangCurrentThread),
165 base::TimeDelta::FromSeconds(2)); 165 base::TimeDelta::FromSeconds(2));
166 return true; 166 return true;
167 } 167 }
168 168
169 if (url == kChromeUIGpuCleanURL) { 169 if (url == kChromeUIGpuCleanURL) {
170 GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, 170 GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
171 false /* force_create */, 171 false /* force_create */,
172 base::Bind([](GpuProcessHost* host) { 172 base::Bind([](GpuProcessHost* host) {
173 host->gpu_service()->DestroyAllChannels(); 173 if (host)
174 host->gpu_service()->DestroyAllChannels();
174 })); 175 }));
175 return true; 176 return true;
176 } 177 }
177 178
178 if (url == kChromeUIGpuCrashURL) { 179 if (url == kChromeUIGpuCrashURL) {
179 GpuProcessHost::CallOnIO( 180 GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
180 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false /* force_create */, 181 false /* force_create */,
181 base::Bind([](GpuProcessHost* host) { host->gpu_service()->Crash(); })); 182 base::Bind([](GpuProcessHost* host) {
183 if (host)
184 host->gpu_service()->Crash();
185 }));
182 return true; 186 return true;
183 } 187 }
184 188
185 #if defined(OS_ANDROID) 189 #if defined(OS_ANDROID)
186 if (url == kChromeUIGpuJavaCrashURL) { 190 if (url == kChromeUIGpuJavaCrashURL) {
187 GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, 191 GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
188 false /* force_create */, 192 false /* force_create */,
189 base::Bind([](GpuProcessHost* host) { 193 base::Bind([](GpuProcessHost* host) {
190 host->gpu_service()->ThrowJavaException(); 194 if (host)
195 host->gpu_service()->ThrowJavaException();
191 })); 196 }));
192 return true; 197 return true;
193 } 198 }
194 #endif 199 #endif
195 200
196 if (url == kChromeUIGpuHangURL) { 201 if (url == kChromeUIGpuHangURL) {
197 GpuProcessHost::CallOnIO( 202 GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
198 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false /* force_create */, 203 false /* force_create */,
199 base::Bind([](GpuProcessHost* host) { host->gpu_service()->Hang(); })); 204 base::Bind([](GpuProcessHost* host) {
205 if (host)
206 host->gpu_service()->Hang();
207 }));
200 return true; 208 return true;
201 } 209 }
202 210
203 if (url == kChromeUIPpapiFlashCrashURL || url == kChromeUIPpapiFlashHangURL) { 211 if (url == kChromeUIPpapiFlashCrashURL || url == kChromeUIPpapiFlashHangURL) {
204 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 212 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
205 base::Bind(&HandlePpapiFlashDebugURL, url)); 213 base::Bind(&HandlePpapiFlashDebugURL, url));
206 return true; 214 return true;
207 } 215 }
208 216
209 return false; 217 return false;
(...skipping 10 matching lines...) Expand all
220 url == kChromeUIBadCastCrashURL || 228 url == kChromeUIBadCastCrashURL ||
221 url == kChromeUICrashURL || 229 url == kChromeUICrashURL ||
222 url == kChromeUIDumpURL || 230 url == kChromeUIDumpURL ||
223 url == kChromeUIKillURL || 231 url == kChromeUIKillURL ||
224 url == kChromeUIHangURL || 232 url == kChromeUIHangURL ||
225 url == kChromeUIShorthangURL || 233 url == kChromeUIShorthangURL ||
226 url == kChromeUIMemoryExhaustURL; 234 url == kChromeUIMemoryExhaustURL;
227 } 235 }
228 236
229 } // namespace content 237 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_data_manager_impl_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698