OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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 CONTENT_BROWSER_RENDERER_HOST_JAVA_BRIDGE_CHANNEL_HOST_H_ | |
6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_BRIDGE_CHANNEL_HOST_H_ | |
7 #pragma once | |
8 | |
9 #include "content/common/np_channel_base.h" | |
10 | |
11 class JavaBridgeChannelHost : public NPChannelBase { | |
12 public: | |
13 static JavaBridgeChannelHost* GetJavaBridgeChannelHost( | |
14 int renderer_id, base::MessageLoopProxy*); | |
15 | |
16 // NPChannelBase implementation: | |
17 virtual int GenerateRouteID() OVERRIDE; | |
18 | |
19 // NPChannelBase override: | |
20 virtual bool Init(base::MessageLoopProxy* ipc_message_loop, | |
21 bool create_pipe_now, | |
22 base::WaitableEvent* shutdown_event) OVERRIDE; | |
23 virtual bool Send(IPC::Message* msg) OVERRIDE; | |
24 | |
25 private: | |
26 JavaBridgeChannelHost() {} | |
27 friend class base::RefCountedThreadSafe<JavaBridgeChannelHost>; | |
28 virtual ~JavaBridgeChannelHost() {} | |
29 | |
30 static NPChannelBase* ClassFactory() { | |
31 return new JavaBridgeChannelHost(); | |
32 } | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(JavaBridgeChannelHost); | |
35 }; | |
36 | |
37 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_BRIDGE_CHANNEL_HOST_H_ | |
OLD | NEW |