Add custom ResourceDispatcherHostDelegate.

This commit is contained in:
Cheng Zhao 2014-08-11 14:08:23 +08:00
parent b26e3a9629
commit 0ad4c3ca93
6 changed files with 79 additions and 0 deletions

View file

@ -11,6 +11,8 @@
namespace atom {
class AtomResourceDispatcherHostDelegate;
class AtomBrowserClient : public brightray::BrowserClient {
public:
AtomBrowserClient();
@ -22,6 +24,7 @@ class AtomBrowserClient : public brightray::BrowserClient {
content::BrowserContext* browser_context,
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
virtual void ResourceDispatcherHostCreated() OVERRIDE;
virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
const GURL& url,
WebPreferences* prefs) OVERRIDE;
@ -37,6 +40,8 @@ class AtomBrowserClient : public brightray::BrowserClient {
virtual brightray::BrowserMainParts* OverrideCreateBrowserMainParts(
const content::MainFunctionParams&) OVERRIDE;
scoped_ptr<AtomResourceDispatcherHostDelegate> resource_dispatcher_delegate_;
// The render process which would be swapped out soon.
content::RenderProcessHost* dying_render_process_;