diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 21:11:37 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 21:11:37 +0000 |
commit | 865cffafa0bec1cb064f3ac90894ef4dc879778d (patch) | |
tree | 510fd5198c5e480349b6cbe857d4017039feea46 /chrome/browser/renderer_host | |
parent | ba69f14e328ac74ad65343eecadfec74273179f5 (diff) | |
download | chromium_src-865cffafa0bec1cb064f3ac90894ef4dc879778d.zip chromium_src-865cffafa0bec1cb064f3ac90894ef4dc879778d.tar.gz chromium_src-865cffafa0bec1cb064f3ac90894ef4dc879778d.tar.bz2 |
Small cleanup. No more need for Init() since the internal process id is valid at construction of RMF. Also make the destructor private.
Review URL: http://codereview.chromium.org/379014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
3 files changed, 7 insertions, 10 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 212134a..6f1a153 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -354,8 +354,6 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process) { } } - resource_message_filter->Init(); - // Now that the process is created, set its backgrounding accordingly. SetBackgrounded(backgrounded_); diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 2cf9b6c..41ddd3d 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -185,6 +185,8 @@ ResourceMessageFilter::ResourceMessageFilter( DCHECK(appcache_dispatcher_host_.get()); DCHECK(dom_storage_dispatcher_host_.get()); DCHECK(socket_stream_dispatcher_host_.get()); + + render_widget_helper_->Init(id(), resource_dispatcher_host_); } ResourceMessageFilter::~ResourceMessageFilter() { @@ -207,11 +209,6 @@ ResourceMessageFilter::~ResourceMessageFilter() { base::CloseProcessHandle(handle()); } -void ResourceMessageFilter::Init() { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - render_widget_helper_->Init(id(), resource_dispatcher_host_); -} - // Called on the IPC thread: void ResourceMessageFilter::OnFilterAdded(IPC::Channel* channel) { channel_ = channel; diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 4971cdb..84a5a33 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -88,9 +88,6 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, Profile* profile, RenderWidgetHelper* render_widget_helper, SpellChecker* spellchecker); - virtual ~ResourceMessageFilter(); - - void Init(); // IPC::ChannelProxy::MessageFilter methods: virtual void OnFilterAdded(IPC::Channel* channel); @@ -121,6 +118,11 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, const NotificationDetails& details); private: + friend class ChromeThread; + friend class DeleteTask<ResourceMessageFilter>; + + virtual ~ResourceMessageFilter(); + void OnMsgCreateWindow(int opener_id, bool user_gesture, int* route_id); void OnMsgCreateWidget(int opener_id, bool activatable, int* route_id); void OnSetCookie(const GURL& url, |