Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1533)

Unified Diff: remoting/host/native_messaging/native_messaging_channel.h

Issue 558403002: Remote Assistance on Chrome OS Part II - Native Messaging renaming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/host/native_messaging/native_messaging_channel.h
diff --git a/remoting/host/native_messaging/native_messaging_channel.h b/remoting/host/native_messaging/native_messaging_channel.h
deleted file mode 100644
index 926f547692e37c257f6e44aacea6ed8775377551..0000000000000000000000000000000000000000
--- a/remoting/host/native_messaging/native_messaging_channel.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_CHANNEL_H_
-#define REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_CHANNEL_H_
-
-#include "base/callback.h"
-#include "base/files/file.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/non_thread_safe.h"
-#include "remoting/host/native_messaging/native_messaging_reader.h"
-#include "remoting/host/native_messaging/native_messaging_writer.h"
-
-namespace base {
-class DictionaryValue;
-class Value;
-} // namespace base
-
-namespace remoting {
-
-// Implements reading messages and sending responses across the native messaging
-// host pipe.
-class NativeMessagingChannel : public base::NonThreadSafe {
- public:
- // Used to send a message to the client app.
- typedef base::Callback<void(scoped_ptr<base::DictionaryValue> message)>
- SendMessageCallback;
-
- // Constructs an object taking the ownership of |input| and |output|. Closes
- // |input| and |output| to prevent the caller from using them.
- NativeMessagingChannel(base::File input, base::File output);
- ~NativeMessagingChannel();
-
- // Starts reading and processing messages.
- void Start(const SendMessageCallback& received_message,
- const base::Closure& quit_closure);
-
- // Sends a message to the client app.
- void SendMessage(scoped_ptr<base::DictionaryValue> message);
-
- private:
- // Processes a message received from the client app.
- void ProcessMessage(scoped_ptr<base::Value> message);
-
- // Initiates shutdown and runs |quit_closure| if there are no pending requests
- // left.
- void Shutdown();
-
- base::Closure quit_closure_;
-
- NativeMessagingReader native_messaging_reader_;
- scoped_ptr<NativeMessagingWriter> native_messaging_writer_;
-
- // The callback to invoke when a message is received.
- SendMessageCallback received_message_;
-
- base::WeakPtr<NativeMessagingChannel> weak_ptr_;
- base::WeakPtrFactory<NativeMessagingChannel> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(NativeMessagingChannel);
-};
-
-} // namespace remoting
-
-#endif // REMOTING_HOST_NATIVE_MESSAGING_NATIVE_MESSAGING_CHANNEL_H_

Powered by Google App Engine
This is Rietveld 408576698