| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PPAPI_PROXY_INTERFACE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_INTERFACE_PROXY_H_ | 
| 6 #define PPAPI_PROXY_INTERFACE_PROXY_H_ | 6 #define PPAPI_PROXY_INTERFACE_PROXY_H_ | 
| 7 | 7 | 
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" | 
| 9 #include "ipc/ipc_channel.h" | 9 #include "ipc/ipc_channel.h" | 
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 52 | 52 | 
| 53   // Returns the local implementation of the interface that will proxy it to | 53   // Returns the local implementation of the interface that will proxy it to | 
| 54   // the remote side. This is used on the source side only (see dispatcher.h). | 54   // the remote side. This is used on the source side only (see dispatcher.h). | 
| 55   virtual const void* GetSourceInterface() const = 0; | 55   virtual const void* GetSourceInterface() const = 0; | 
| 56 | 56 | 
| 57   // Returns the interface ID associated with this proxy. Implemented by each | 57   // Returns the interface ID associated with this proxy. Implemented by each | 
| 58   // derived class to identify itself. | 58   // derived class to identify itself. | 
| 59   virtual InterfaceID GetInterfaceId() const = 0; | 59   virtual InterfaceID GetInterfaceId() const = 0; | 
| 60 | 60 | 
| 61   // Sub-classes must implement IPC::Channel::Listener which contains this: | 61   // Sub-classes must implement IPC::Channel::Listener which contains this: | 
| 62   //virtual void OnMessageReceived(const IPC::Message& msg); | 62   //virtual bool OnMessageReceived(const IPC::Message& msg); | 
| 63 | 63 | 
| 64  protected: | 64  protected: | 
| 65   uint32 SendCallback(PP_CompletionCallback callback); | 65   uint32 SendCallback(PP_CompletionCallback callback); | 
| 66   PP_CompletionCallback ReceiveCallback(uint32 serialized_callback); | 66   PP_CompletionCallback ReceiveCallback(uint32 serialized_callback); | 
| 67 | 67 | 
| 68  private: | 68  private: | 
| 69   Dispatcher* dispatcher_; | 69   Dispatcher* dispatcher_; | 
| 70   const void* target_interface_; | 70   const void* target_interface_; | 
| 71 }; | 71 }; | 
| 72 | 72 | 
| 73 inline PP_Bool BoolToPPBool(bool value) { | 73 inline PP_Bool BoolToPPBool(bool value) { | 
| 74   return value ? PP_TRUE : PP_FALSE; | 74   return value ? PP_TRUE : PP_FALSE; | 
| 75 } | 75 } | 
| 76 | 76 | 
| 77 inline bool PPBoolToBool(PP_Bool value) { | 77 inline bool PPBoolToBool(PP_Bool value) { | 
| 78   return (PP_TRUE == value); | 78   return (PP_TRUE == value); | 
| 79 } | 79 } | 
| 80 | 80 | 
| 81 }  // namespace proxy | 81 }  // namespace proxy | 
| 82 }  // namespace pp | 82 }  // namespace pp | 
| 83 | 83 | 
| 84 #endif  // PPAPI_PROXY_INTERFACE_PROXY_H_ | 84 #endif  // PPAPI_PROXY_INTERFACE_PROXY_H_ | 
| 85 | 85 | 
| OLD | NEW | 
|---|