| Index: chrome/browser/extensions/api/messaging/native_message_port.cc
|
| diff --git a/chrome/browser/extensions/api/messaging/native_message_port.cc b/chrome/browser/extensions/api/messaging/native_message_port.cc
|
| index a0a47d561bbb77cad1e495fcaad3a1a5bb46da41..93c51a5f696e9790192c72a40cf95b3030aa2efa 100644
|
| --- a/chrome/browser/extensions/api/messaging/native_message_port.cc
|
| +++ b/chrome/browser/extensions/api/messaging/native_message_port.cc
|
| @@ -10,22 +10,26 @@
|
|
|
| namespace extensions {
|
|
|
| -NativeMessagePort::NativeMessagePort(NativeMessageProcessHost* native_process)
|
| - : native_process_(native_process) {
|
| +NativeMessagePort::NativeMessagePort(
|
| + scoped_ptr<NativeMessageHost> native_message_host) {
|
| + native_message_host_ = native_message_host.Pass();
|
| }
|
|
|
| NativeMessagePort::~NativeMessagePort() {
|
| content::BrowserThread::DeleteSoon(
|
| - content::BrowserThread::IO, FROM_HERE, native_process_);
|
| + content::BrowserThread::IO, FROM_HERE, native_message_host_.release());
|
| }
|
|
|
| void NativeMessagePort::DispatchOnMessage(
|
| const Message& message,
|
| int target_port_id) {
|
| content::BrowserThread::PostTask(
|
| - content::BrowserThread::IO, FROM_HERE,
|
| - base::Bind(&NativeMessageProcessHost::Send,
|
| - base::Unretained(native_process_), message.data));
|
| + content::BrowserThread::IO,
|
| + FROM_HERE,
|
| + base::Bind(&NativeMessageHost::Send,
|
| + base::Unretained(native_message_host_.get()),
|
| + message.data));
|
| }
|
|
|
| } // namespace extensions
|
| +
|
|
|