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 CLOUD_PRINT_SERVICE_SERVICE_LISTENER_H_
6 #define CLOUD_PRINT_SERVICE_SERVICE_LISTENER_H_
8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ipc/ipc_listener.h"
21 // Simple IPC listener to run on service side to collect service environment and
22 // to send back to setup utility.
23 class ServiceListener : public IPC::Listener {
25 explicit ServiceListener(const base::FilePath& user_data_dir);
26 virtual ~ServiceListener();
28 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
29 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
35 scoped_ptr<base::Thread> ipc_thread_;
36 scoped_ptr<IPC::Channel> channel_;
37 base::FilePath user_data_dir_;
40 #endif // CLOUD_PRINT_SERVICE_SERVICE_LISTENER_H_