| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_ |
| 7 | 7 |
| 8 #include "content/child/np_channel_base.h" | 8 #include "content/child/np_channel_base.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // NPChannelBase override: | 26 // NPChannelBase override: |
| 27 virtual bool Init(base::MessageLoopProxy* ipc_message_loop, | 27 virtual bool Init(base::MessageLoopProxy* ipc_message_loop, |
| 28 bool create_pipe_now, | 28 bool create_pipe_now, |
| 29 base::WaitableEvent* shutdown_event) OVERRIDE; | 29 base::WaitableEvent* shutdown_event) OVERRIDE; |
| 30 | 30 |
| 31 protected: | 31 protected: |
| 32 // NPChannelBase override: | 32 // NPChannelBase override: |
| 33 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 33 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 JavaBridgeChannelHost() {} | |
| 37 friend class base::RefCountedThreadSafe<JavaBridgeChannelHost>; | 36 friend class base::RefCountedThreadSafe<JavaBridgeChannelHost>; |
| 37 JavaBridgeChannelHost(); |
| 38 virtual ~JavaBridgeChannelHost(); | 38 virtual ~JavaBridgeChannelHost(); |
| 39 | 39 |
| 40 static NPChannelBase* ClassFactory() { | 40 static NPChannelBase* ClassFactory() { |
| 41 return new JavaBridgeChannelHost(); | 41 return new JavaBridgeChannelHost(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 // Message handlers | 44 // Message handlers |
| 45 void OnGenerateRouteID(int* route_id); | 45 void OnGenerateRouteID(int* route_id); |
| 46 | 46 |
| 47 // Dummy NPObject owner Id used to track objects received from the Renderer. |
| 48 scoped_ptr<struct _NPP> peer_owner_id_; |
| 49 |
| 47 DISALLOW_COPY_AND_ASSIGN(JavaBridgeChannelHost); | 50 DISALLOW_COPY_AND_ASSIGN(JavaBridgeChannelHost); |
| 48 }; | 51 }; |
| 49 | 52 |
| 50 } // namespace content | 53 } // namespace content |
| 51 | 54 |
| 52 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_ | 55 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BRIDGE_CHANNEL_HOST_H_ |
| OLD | NEW |