OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_JAVA_BRIDGE_CHANNEL_H_ | 5 #ifndef CONTENT_RENDERER_JAVA_JAVA_BRIDGE_CHANNEL_H_ |
6 #define CONTENT_RENDERER_JAVA_BRIDGE_CHANNEL_H_ | 6 #define CONTENT_RENDERER_JAVA_JAVA_BRIDGE_CHANNEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "content/common/np_channel_base.h" | 9 #include "content/common/np_channel_base.h" |
10 #include "ipc/ipc_channel_handle.h" | 10 #include "ipc/ipc_channel_handle.h" |
11 | 11 |
12 class JavaBridgeChannel : public NPChannelBase { | 12 class JavaBridgeChannel : public NPChannelBase { |
13 public: | 13 public: |
14 static JavaBridgeChannel* GetJavaBridgeChannel( | 14 static JavaBridgeChannel* GetJavaBridgeChannel( |
15 const IPC::ChannelHandle& channel_handle, | 15 const IPC::ChannelHandle& channel_handle, |
16 base::MessageLoopProxy* ipc_message_loop); | 16 base::MessageLoopProxy* ipc_message_loop); |
17 virtual ~JavaBridgeChannel() {} | 17 virtual ~JavaBridgeChannel() {} |
18 | 18 |
19 // NPChannelBase implementation: | 19 // NPChannelBase implementation: |
20 virtual int GenerateRouteID() OVERRIDE; | 20 virtual int GenerateRouteID() OVERRIDE; |
21 | 21 |
22 // NPChannelBase override: | 22 // NPChannelBase override: |
23 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 23 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
24 | 24 |
25 private: | 25 private: |
26 JavaBridgeChannel() {} | 26 JavaBridgeChannel() {} |
27 | 27 |
28 static NPChannelBase* ClassFactory() { return new JavaBridgeChannel(); } | 28 static NPChannelBase* ClassFactory() { return new JavaBridgeChannel(); } |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(JavaBridgeChannel); | 30 DISALLOW_COPY_AND_ASSIGN(JavaBridgeChannel); |
31 }; | 31 }; |
32 | 32 |
33 #endif // CONTENT_RENDERER_JAVA_BRIDGE_CHANNEL_H_ | 33 #endif // CONTENT_RENDERER_JAVA_JAVA_BRIDGE_CHANNEL_H_ |
OLD | NEW |