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

Unified Diff: cloud_print/service/win/service_listener.h

Issue 13039002: Send data back from service using IPC, not file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « cloud_print/service/win/service_ipc_unittest.cc ('k') | cloud_print/service/win/service_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/service/win/service_listener.h
diff --git a/cloud_print/service/win/service_listener.h b/cloud_print/service/win/service_listener.h
new file mode 100644
index 0000000000000000000000000000000000000000..ffb3aa6d4e9867f8135f4d23c90595c9035c897a
--- /dev/null
+++ b/cloud_print/service/win/service_listener.h
@@ -0,0 +1,41 @@
+// 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 CLOUD_PRINT_SERVICE_SERVICE_LISTENER_H_
+#define CLOUD_PRINT_SERVICE_SERVICE_LISTENER_H_
+
+#include "base/compiler_specific.h"
+#include "base/files/file_path.h"
+#include "base/memory/scoped_ptr.h"
+#include "ipc/ipc_listener.h"
+
+namespace base {
+class Thread;
+} // base
+
+namespace IPC {
+class Channel;
+} // IPC
+
+// Simple IPC listener to run on service side to collect service environment and
+// to send back to setup utility.
+class ServiceListener : public IPC::Listener {
+ public:
+ explicit ServiceListener(const base::FilePath& user_data_dir);
+ virtual ~ServiceListener();
+
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
+ virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
+
+ private:
+ void Disconnect();
+ void Connect();
+
+ scoped_ptr<base::Thread> ipc_thread_;
+ scoped_ptr<IPC::Channel> channel_;
+ base::FilePath user_data_dir_;
+};
+
+#endif // CLOUD_PRINT_SERVICE_SERVICE_LISTENER_H_
+
« no previous file with comments | « cloud_print/service/win/service_ipc_unittest.cc ('k') | cloud_print/service/win/service_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698