blob: fe825040b3ffff612b660fe4b443e1b6bbbdfbf8 [file] [log] [blame]
[email protected]df338b7d2012-09-05 19:58:361// Copyright (c) 2012 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.
4
5#ifndef REMOTING_HOST_WORKER_PROCESS_IPC_DELEGATE_H_
6#define REMOTING_HOST_WORKER_PROCESS_IPC_DELEGATE_H_
7
avic5960f32015-12-22 22:49:488#include <stdint.h>
9
[email protected]df338b7d2012-09-05 19:58:3610#include "base/compiler_specific.h"
11
12namespace IPC {
13class Message;
14} // namespace IPC
15
16namespace remoting {
17
18// An interface representing the object receiving IPC messages from a worker
19// process.
20class WorkerProcessIpcDelegate {
21 public:
22 virtual ~WorkerProcessIpcDelegate() {}
23
24 // Notifies that a client has been connected to the channel.
avic5960f32015-12-22 22:49:4825 virtual void OnChannelConnected(int32_t peer_pid) = 0;
[email protected]df338b7d2012-09-05 19:58:3626
27 // Processes messages sent by the client.
28 virtual bool OnMessageReceived(const IPC::Message& message) = 0;
[email protected]97339762012-10-10 19:00:0629
30 // Notifies that a permanent error was encountered.
[email protected]a4b39952013-06-21 03:57:0831 virtual void OnPermanentError(int exit_code) = 0;
zijiehedda3acb2017-06-29 23:19:1632
33 // Notifies that the worker process stops for any reason.
34 virtual void OnWorkerProcessStopped() = 0;
[email protected]df338b7d2012-09-05 19:58:3635};
36
37} // namespace remoting
38
39#endif // REMOTING_HOST_WORKER_PROCESS_IPC_DELEGATE_H_