| Index: remoting/host/native_messaging/pipe_messaging_channel.cc
|
| diff --git a/remoting/host/native_messaging/native_messaging_channel.cc b/remoting/host/native_messaging/pipe_messaging_channel.cc
|
| similarity index 79%
|
| rename from remoting/host/native_messaging/native_messaging_channel.cc
|
| rename to remoting/host/native_messaging/pipe_messaging_channel.cc
|
| index 007de56fcacff50f8e4b2c139f717a40268633ba..bb9c02598efe6509b806de34dc52c574253ff3ab 100644
|
| --- a/remoting/host/native_messaging/native_messaging_channel.cc
|
| +++ b/remoting/host/native_messaging/pipe_messaging_channel.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "remoting/host/native_messaging/native_messaging_channel.h"
|
| +#include "remoting/host/native_messaging/pipe_messaging_channel.h"
|
|
|
| #include "base/basictypes.h"
|
| #include "base/bind.h"
|
| @@ -43,7 +43,7 @@ base::File DuplicatePlatformFile(base::File file) {
|
|
|
| namespace remoting {
|
|
|
| -NativeMessagingChannel::NativeMessagingChannel(
|
| +PipeMessagingChannel::PipeMessagingChannel(
|
| base::File input,
|
| base::File output)
|
| : native_messaging_reader_(DuplicatePlatformFile(input.Pass())),
|
| @@ -53,11 +53,11 @@ NativeMessagingChannel::NativeMessagingChannel(
|
| weak_ptr_ = weak_factory_.GetWeakPtr();
|
| }
|
|
|
| -NativeMessagingChannel::~NativeMessagingChannel() {
|
| +PipeMessagingChannel::~PipeMessagingChannel() {
|
| }
|
|
|
| -void NativeMessagingChannel::Start(const SendMessageCallback& received_message,
|
| - const base::Closure& quit_closure) {
|
| +void PipeMessagingChannel::Start(const SendMessageCallback& received_message,
|
| + const base::Closure& quit_closure) {
|
| DCHECK(CalledOnValidThread());
|
| DCHECK(received_message_.is_null());
|
| DCHECK(quit_closure_.is_null());
|
| @@ -66,11 +66,11 @@ void NativeMessagingChannel::Start(const SendMessageCallback& received_message,
|
| quit_closure_ = quit_closure;
|
|
|
| native_messaging_reader_.Start(
|
| - base::Bind(&NativeMessagingChannel::ProcessMessage, weak_ptr_),
|
| - base::Bind(&NativeMessagingChannel::Shutdown, weak_ptr_));
|
| + base::Bind(&PipeMessagingChannel::ProcessMessage, weak_ptr_),
|
| + base::Bind(&PipeMessagingChannel::Shutdown, weak_ptr_));
|
| }
|
|
|
| -void NativeMessagingChannel::ProcessMessage(scoped_ptr<base::Value> message) {
|
| +void PipeMessagingChannel::ProcessMessage(scoped_ptr<base::Value> message) {
|
| DCHECK(CalledOnValidThread());
|
|
|
| if (message->GetType() != base::Value::TYPE_DICTIONARY) {
|
| @@ -84,7 +84,7 @@ void NativeMessagingChannel::ProcessMessage(scoped_ptr<base::Value> message) {
|
| received_message_.Run(message_dict.Pass());
|
| }
|
|
|
| -void NativeMessagingChannel::SendMessage(
|
| +void PipeMessagingChannel::SendMessage(
|
| scoped_ptr<base::DictionaryValue> message) {
|
| DCHECK(CalledOnValidThread());
|
|
|
| @@ -99,7 +99,7 @@ void NativeMessagingChannel::SendMessage(
|
| }
|
| }
|
|
|
| -void NativeMessagingChannel::Shutdown() {
|
| +void PipeMessagingChannel::Shutdown() {
|
| DCHECK(CalledOnValidThread());
|
|
|
| if (!quit_closure_.is_null())
|
|
|