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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_WRITER_H_
6 #define REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_WRITER_H_
8 #include "base/platform_file.h"
9 #include "net/base/file_stream.h"
17 // This class is used for sending messages to the Native Messaging client
19 class NativeMessagingWriter
{
21 explicit NativeMessagingWriter(base::PlatformFile handle
);
22 ~NativeMessagingWriter();
24 // Sends a message to the Native Messaging client, returning true if
26 bool WriteMessage(const base::Value
& message
);
29 net::FileStream write_stream_
;
32 DISALLOW_COPY_AND_ASSIGN(NativeMessagingWriter
);
35 } // namespace remoting
37 #endif // REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_WRITER_H_