| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/nacl/browser/nacl_host_message_filter.h" | 5 #include "components/nacl/browser/nacl_host_message_filter.h" |
| 6 | 6 |
| 7 #include "base/sys_info.h" | 7 #include "base/sys_info.h" |
| 8 #include "components/nacl/browser/nacl_browser.h" | 8 #include "components/nacl/browser/nacl_browser.h" |
| 9 #include "components/nacl/browser/nacl_file_host.h" | 9 #include "components/nacl/browser/nacl_file_host.h" |
| 10 #include "components/nacl/browser/nacl_process_host.h" | 10 #include "components/nacl/browser/nacl_process_host.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 weak_ptr_factory_(this) { | 30 weak_ptr_factory_(this) { |
| 31 } | 31 } |
| 32 | 32 |
| 33 NaClHostMessageFilter::~NaClHostMessageFilter() { | 33 NaClHostMessageFilter::~NaClHostMessageFilter() { |
| 34 } | 34 } |
| 35 | 35 |
| 36 void NaClHostMessageFilter::OnChannelClosing() { | 36 void NaClHostMessageFilter::OnChannelClosing() { |
| 37 pnacl::PnaclHost::GetInstance()->RendererClosing(render_process_id_); | 37 pnacl::PnaclHost::GetInstance()->RendererClosing(render_process_id_); |
| 38 } | 38 } |
| 39 | 39 |
| 40 bool NaClHostMessageFilter::OnMessageReceived(const IPC::Message& message, | 40 bool NaClHostMessageFilter::OnMessageReceived(const IPC::Message& message) { |
| 41 bool* message_was_ok) { | |
| 42 bool handled = true; | 41 bool handled = true; |
| 43 IPC_BEGIN_MESSAGE_MAP_EX(NaClHostMessageFilter, message, *message_was_ok) | 42 IPC_BEGIN_MESSAGE_MAP(NaClHostMessageFilter, message) |
| 44 #if !defined(DISABLE_NACL) | 43 #if !defined(DISABLE_NACL) |
| 45 IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_LaunchNaCl, OnLaunchNaCl) | 44 IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_LaunchNaCl, OnLaunchNaCl) |
| 46 IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_GetReadonlyPnaclFD, | 45 IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_GetReadonlyPnaclFD, |
| 47 OnGetReadonlyPnaclFd) | 46 OnGetReadonlyPnaclFd) |
| 48 IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_NaClCreateTemporaryFile, | 47 IPC_MESSAGE_HANDLER_DELAY_REPLY(NaClHostMsg_NaClCreateTemporaryFile, |
| 49 OnNaClCreateTemporaryFile) | 48 OnNaClCreateTemporaryFile) |
| 50 IPC_MESSAGE_HANDLER(NaClHostMsg_NexeTempFileRequest, | 49 IPC_MESSAGE_HANDLER(NaClHostMsg_NexeTempFileRequest, |
| 51 OnGetNexeFd) | 50 OnGetNexeFd) |
| 52 IPC_MESSAGE_HANDLER(NaClHostMsg_ReportTranslationFinished, | 51 IPC_MESSAGE_HANDLER(NaClHostMsg_ReportTranslationFinished, |
| 53 OnTranslationFinished) | 52 OnTranslationFinished) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 reply_msg); | 185 reply_msg); |
| 187 } | 186 } |
| 188 | 187 |
| 189 void NaClHostMessageFilter::OnNaClDebugEnabledForURL(const GURL& nmf_url, | 188 void NaClHostMessageFilter::OnNaClDebugEnabledForURL(const GURL& nmf_url, |
| 190 bool* should_debug) { | 189 bool* should_debug) { |
| 191 *should_debug = | 190 *should_debug = |
| 192 nacl::NaClBrowser::GetDelegate()->URLMatchesDebugPatterns(nmf_url); | 191 nacl::NaClBrowser::GetDelegate()->URLMatchesDebugPatterns(nmf_url); |
| 193 } | 192 } |
| 194 | 193 |
| 195 } // namespace nacl | 194 } // namespace nacl |
| OLD | NEW |