diff options
author | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 06:07:14 +0000 |
---|---|---|
committer | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 06:07:14 +0000 |
commit | d1549b8de5f07af6de2e1e58d3e6ce8ec6754f60 (patch) | |
tree | 78246b8aa9134c47dda365f11e822e6c2e6d69cf /components/nacl/renderer/pnacl_translation_resource_host.cc | |
parent | 12a63dac960d6714b9d6d863117ac4d734f283d4 (diff) | |
download | chromium_src-d1549b8de5f07af6de2e1e58d3e6ce8ec6754f60.zip chromium_src-d1549b8de5f07af6de2e1e58d3e6ce8ec6754f60.tar.gz chromium_src-d1549b8de5f07af6de2e1e58d3e6ce8ec6754f60.tar.bz2 |
Decouple IPC::MessageFilter from IPC::Channel
This change gets rid of Channel dependency from MessageFilter
so that it depends only on IPC::Sender.
TEST=none
BUG=377980
R=jam@chromium.org, darin@chromium.org
Review URL: https://codereview.chromium.org/324143002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/nacl/renderer/pnacl_translation_resource_host.cc')
-rw-r--r-- | components/nacl/renderer/pnacl_translation_resource_host.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/components/nacl/renderer/pnacl_translation_resource_host.cc b/components/nacl/renderer/pnacl_translation_resource_host.cc index 087c804..5ac1e8a 100644 --- a/components/nacl/renderer/pnacl_translation_resource_host.cc +++ b/components/nacl/renderer/pnacl_translation_resource_host.cc @@ -21,26 +21,26 @@ PnaclTranslationResourceHost::CacheRequestInfo::~CacheRequestInfo() {} PnaclTranslationResourceHost::PnaclTranslationResourceHost( const scoped_refptr<base::MessageLoopProxy>& io_message_loop) - : io_message_loop_(io_message_loop), channel_(NULL) {} + : io_message_loop_(io_message_loop), sender_(NULL) {} PnaclTranslationResourceHost::~PnaclTranslationResourceHost() { DCHECK(io_message_loop_->BelongsToCurrentThread()); CleanupCacheRequests(); } -void PnaclTranslationResourceHost::OnFilterAdded(IPC::Channel* channel) { +void PnaclTranslationResourceHost::OnFilterAdded(IPC::Sender* sender) { DCHECK(io_message_loop_->BelongsToCurrentThread()); - channel_ = channel; + sender_ = sender; } void PnaclTranslationResourceHost::OnFilterRemoved() { DCHECK(io_message_loop_->BelongsToCurrentThread()); - channel_ = NULL; + sender_ = NULL; } void PnaclTranslationResourceHost::OnChannelClosing() { DCHECK(io_message_loop_->BelongsToCurrentThread()); - channel_ = NULL; + sender_ = NULL; } bool PnaclTranslationResourceHost::OnMessageReceived( @@ -84,8 +84,8 @@ void PnaclTranslationResourceHost::SendRequestNexeFd( PP_FileHandle* file_handle, scoped_refptr<TrackedCallback> callback) { DCHECK(io_message_loop_->BelongsToCurrentThread()); - if (!channel_ || !channel_->Send(new NaClHostMsg_NexeTempFileRequest( - render_view_id, instance, cache_info))) { + if (!sender_ || !sender_->Send(new NaClHostMsg_NexeTempFileRequest( + render_view_id, instance, cache_info))) { PpapiGlobals::Get()->GetMainThreadMessageLoop() ->PostTask(FROM_HERE, base::Bind(&TrackedCallback::Run, @@ -115,13 +115,13 @@ void PnaclTranslationResourceHost::SendReportTranslationFinished( PP_Instance instance, PP_Bool success) { DCHECK(io_message_loop_->BelongsToCurrentThread()); - // If the channel is closed or we have been detached, we are probably shutting + // If the sender is closed or we have been detached, we are probably shutting // down, so just don't send anything. - if (!channel_) + if (!sender_) return; DCHECK(pending_cache_requests_.count(instance) == 0); - channel_->Send(new NaClHostMsg_ReportTranslationFinished(instance, - PP_ToBool(success))); + sender_->Send(new NaClHostMsg_ReportTranslationFinished(instance, + PP_ToBool(success))); } void PnaclTranslationResourceHost::OnNexeTempFileReply( |