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

Side by Side Diff: chrome/browser/extensions/extension_host.h

Issue 126289: Graceful handling of extension process crashes (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/extension_host.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 (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_EXTENSIONS_EXTENSION_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Create an ExtensionView and tie it to this host and |browser|. 43 // Create an ExtensionView and tie it to this host and |browser|.
44 void CreateView(Browser* browser); 44 void CreateView(Browser* browser);
45 45
46 Extension* extension() { return extension_; } 46 Extension* extension() { return extension_; }
47 RenderViewHost* render_view_host() const { return render_view_host_; } 47 RenderViewHost* render_view_host() const { return render_view_host_; }
48 RenderProcessHost* render_process_host() const; 48 RenderProcessHost* render_process_host() const;
49 SiteInstance* site_instance() const; 49 SiteInstance* site_instance() const;
50 bool did_stop_loading() const { return did_stop_loading_; } 50 bool did_stop_loading() const { return did_stop_loading_; }
51 51
52 // Returns true if the render view is initialized and didn't crash.
53 bool IsRenderViewLive() const;
54
52 // Initializes our RenderViewHost by creating its RenderView and navigating 55 // Initializes our RenderViewHost by creating its RenderView and navigating
53 // to this host's url. Uses host_view for the RenderViewHost's view (can be 56 // to this host's url. Uses host_view for the RenderViewHost's view (can be
54 // NULL). 57 // NULL).
55 void CreateRenderView(RenderWidgetHostView* host_view); 58 void CreateRenderView(RenderWidgetHostView* host_view);
56 59
60 // Restarts extension's renderer process. Can be called only if the renderer
61 // process crashed.
62 void RecoverCrashedExtension();
63
57 // RenderViewHostDelegate 64 // RenderViewHostDelegate
58 virtual const GURL& GetURL() const { return url_; } 65 virtual const GURL& GetURL() const { return url_; }
66 virtual void RenderViewGone(RenderViewHost* render_view_host);
59 virtual WebPreferences GetWebkitPrefs(); 67 virtual WebPreferences GetWebkitPrefs();
60 virtual void RunJavaScriptMessage( 68 virtual void RunJavaScriptMessage(
61 const std::wstring& message, 69 const std::wstring& message,
62 const std::wstring& default_prompt, 70 const std::wstring& default_prompt,
63 const GURL& frame_url, 71 const GURL& frame_url,
64 const int flags, 72 const int flags,
65 IPC::Message* reply_msg, 73 IPC::Message* reply_msg,
66 bool* did_suppress_message); 74 bool* did_suppress_message);
67 virtual void DidStopLoading(RenderViewHost* render_view_host); 75 virtual void DidStopLoading(RenderViewHost* render_view_host);
68 virtual RenderViewHostDelegate::View* GetViewDelegate() const; 76 virtual RenderViewHostDelegate::View* GetViewDelegate() const;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Whether the RenderWidget has reported that it has stopped loading. 125 // Whether the RenderWidget has reported that it has stopped loading.
118 bool did_stop_loading_; 126 bool did_stop_loading_;
119 127
120 // The URL being hosted. 128 // The URL being hosted.
121 GURL url_; 129 GURL url_;
122 130
123 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 131 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
124 }; 132 };
125 133
126 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 134 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698