• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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 COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_
6 #define COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_
7 
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ipc/ipc_listener.h"
11 
12 namespace base {
13 class WaitableEvent;
14 }  // namespace base
15 
16 namespace IPC {
17 class ChannelProxy;
18 struct ChannelHandle;
19 class Message;
20 }  // namespace IPC
21 
22 namespace nacl {
23 
24 class TrustedPluginChannel : public IPC::Listener {
25  public:
26   explicit TrustedPluginChannel(const IPC::ChannelHandle& handle);
27   virtual ~TrustedPluginChannel();
28 
29   bool Send(IPC::Message* message);
30 
31   // Listener implementation.
32   virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
33 
34  private:
35   scoped_ptr<IPC::ChannelProxy> channel_proxy_;
36 
37   DISALLOW_COPY_AND_ASSIGN(TrustedPluginChannel);
38 };
39 
40 }  // namespace nacl
41 
42 #endif  // COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_
43