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

Side by Side Diff: chrome/browser/renderer_host/render_process_host.h

Issue 5172009: This adds some plumbing for propagating the reason for a renderer's death (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final review changes Created 10 years 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "app/surface/transport_dib.h" 11 #include "app/surface/transport_dib.h"
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "base/process.h" 13 #include "base/process.h"
14 #include "base/process_util.h"
14 #include "base/scoped_ptr.h" 15 #include "base/scoped_ptr.h"
15 #include "base/time.h" 16 #include "base/time.h"
16 #include "chrome/common/visitedlink_common.h" 17 #include "chrome/common/visitedlink_common.h"
17 #include "ipc/ipc_sync_channel.h" 18 #include "ipc/ipc_sync_channel.h"
18 19
19 class Profile; 20 class Profile;
20 class URLRequestContextGetter; 21 class URLRequestContextGetter;
21 struct ViewMsg_ClosePage_Params; 22 struct ViewMsg_ClosePage_Params;
22 23
23 namespace base { 24 namespace base {
(...skipping 17 matching lines...) Expand all
41 // Note: it may be possible for a renderer to have multiple privileges, 42 // Note: it may be possible for a renderer to have multiple privileges,
42 // in which case we call it an "extension" renderer. 43 // in which case we call it an "extension" renderer.
43 enum Type { 44 enum Type {
44 TYPE_NORMAL, // Normal renderer, no extra privileges. 45 TYPE_NORMAL, // Normal renderer, no extra privileges.
45 TYPE_DOMUI, // Renderer with DOMUI privileges, like New Tab. 46 TYPE_DOMUI, // Renderer with DOMUI privileges, like New Tab.
46 TYPE_EXTENSION, // Renderer with extension privileges. 47 TYPE_EXTENSION, // Renderer with extension privileges.
47 }; 48 };
48 49
49 // Details for RENDERER_PROCESS_CLOSED notifications. 50 // Details for RENDERER_PROCESS_CLOSED notifications.
50 struct RendererClosedDetails { 51 struct RendererClosedDetails {
51 RendererClosedDetails(bool did_crash, bool was_extension_renderer) { 52 RendererClosedDetails(base::TerminationStatus status,
52 this->did_crash = did_crash; 53 int exit_code,
54 bool was_extension_renderer) {
55 this->status = status;
56 this->exit_code = exit_code;
53 this->was_extension_renderer = was_extension_renderer; 57 this->was_extension_renderer = was_extension_renderer;
54 } 58 }
55 bool did_crash; 59 base::TerminationStatus status;
60 int exit_code;
56 bool was_extension_renderer; 61 bool was_extension_renderer;
57 }; 62 };
58 63
59 explicit RenderProcessHost(Profile* profile); 64 explicit RenderProcessHost(Profile* profile);
60 virtual ~RenderProcessHost(); 65 virtual ~RenderProcessHost();
61 66
62 // Returns the user profile associated with this renderer process. 67 // Returns the user profile associated with this renderer process.
63 Profile* profile() const { return profile_; } 68 Profile* profile() const { return profile_; }
64 69
65 // Returns the unique ID for this child process. This can be used later in 70 // Returns the unique ID for this child process. This can be used later in
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // Factory object for RenderProcessHosts. Using this factory allows tests to 318 // Factory object for RenderProcessHosts. Using this factory allows tests to
314 // swap out a different one to use a TestRenderProcessHost. 319 // swap out a different one to use a TestRenderProcessHost.
315 class RenderProcessHostFactory { 320 class RenderProcessHostFactory {
316 public: 321 public:
317 virtual ~RenderProcessHostFactory() {} 322 virtual ~RenderProcessHostFactory() {}
318 virtual RenderProcessHost* CreateRenderProcessHost( 323 virtual RenderProcessHost* CreateRenderProcessHost(
319 Profile* profile) const = 0; 324 Profile* profile) const = 0;
320 }; 325 };
321 326
322 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ 327 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698