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

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

Issue 9960071: TabContents -> WebContentsImpl, part 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/tab_contents/debug_urls.h"
6
7 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
8 #include "content/public/common/url_constants.h"
9 #include "googleurl/src/gurl.h"
10
11 namespace content {
12
13 bool HandleDebugURL(const GURL& url, content::PageTransition transition) {
14 content::PageTransition base_transition =
15 content::PageTransitionStripQualifier(transition);
16 if (base_transition != content::PAGE_TRANSITION_TYPED)
17 return false;
18
19 if (url.host() == chrome::kChromeUIBrowserCrashHost) {
20 // Induce an intentional crash in the browser process.
21 CHECK(false);
22 return true;
23 }
24
25 if (url == GURL(chrome::kChromeUIGpuCleanURL)) {
26 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
27 if (shim)
28 shim->SimulateRemoveAllContext();
29 return true;
30 }
31
32 if (url == GURL(chrome::kChromeUIGpuCrashURL)) {
33 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
34 if (shim)
35 shim->SimulateCrash();
36 return true;
37 }
38
39 if (url == GURL(chrome::kChromeUIGpuHangURL)) {
40 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
41 if (shim)
42 shim->SimulateHang();
43 return true;
44 }
45
46 return false;
47 }
48
49 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tab_contents/debug_urls.h ('k') | content/browser/tab_contents/drag_utils_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698