Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / remoting / host / worker_process_ipc_delegate.h
blobbdacd4758f9c8a0ccd20a2f8938d005c4abb839d
1 // 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.
5 #ifndef REMOTING_HOST_WORKER_PROCESS_IPC_DELEGATE_H_
6 #define REMOTING_HOST_WORKER_PROCESS_IPC_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
11 namespace IPC {
12 class Message;
13 } // namespace IPC
15 namespace remoting {
17 // An interface representing the object receiving IPC messages from a worker
18 // process.
19 class WorkerProcessIpcDelegate {
20 public:
21 virtual ~WorkerProcessIpcDelegate() {}
23 // Notifies that a client has been connected to the channel.
24 virtual void OnChannelConnected(int32 peer_pid) = 0;
26 // Processes messages sent by the client.
27 virtual bool OnMessageReceived(const IPC::Message& message) = 0;
29 // Notifies that a permanent error was encountered.
30 virtual void OnPermanentError(int exit_code) = 0;
33 } // namespace remoting
35 #endif // REMOTING_HOST_WORKER_PROCESS_IPC_DELEGATE_H_