| 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_HOST_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ | 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Returns the host's notion of our PP_Module. This will be different than | 52 // Returns the host's notion of our PP_Module. This will be different than |
| 53 // the plugin's notion of its PP_Module because the plugin process may be | 53 // the plugin's notion of its PP_Module because the plugin process may be |
| 54 // used by multiple renderer processes. | 54 // used by multiple renderer processes. |
| 55 // | 55 // |
| 56 // Use this value instead of a value from the plugin whenever talking to the | 56 // Use this value instead of a value from the plugin whenever talking to the |
| 57 // host. | 57 // host. |
| 58 PP_Module pp_module() const { return pp_module_; } | 58 PP_Module pp_module() const { return pp_module_; } |
| 59 | 59 |
| 60 // Dispatcher overrides. | 60 // Dispatcher overrides. |
| 61 virtual bool IsPlugin() const; | 61 virtual bool IsPlugin() const; |
| 62 virtual bool Send(IPC::Message* msg); |
| 62 | 63 |
| 63 // IPC::Channel::Listener. | 64 // IPC::Channel::Listener. |
| 64 virtual bool OnMessageReceived(const IPC::Message& msg); | 65 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 65 virtual void OnChannelError(); | 66 virtual void OnChannelError(); |
| 66 | 67 |
| 67 // Proxied version of calling GetInterface on the plugin. This will check | 68 // Proxied version of calling GetInterface on the plugin. This will check |
| 68 // if the plugin supports the given interface (with caching) and returns the | 69 // if the plugin supports the given interface (with caching) and returns the |
| 69 // pointer to the proxied interface if it is supported. Returns NULL if the | 70 // pointer to the proxied interface if it is supported. Returns NULL if the |
| 70 // given interface isn't supported by the plugin or the proxy. | 71 // given interface isn't supported by the plugin or the proxy. |
| 71 const void* GetProxiedInterface(const std::string& interface); | 72 const void* GetProxiedInterface(const std::string& interface); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // Lazily initialized, may be NULL. Use GetPPBProxy(). | 105 // Lazily initialized, may be NULL. Use GetPPBProxy(). |
| 105 const PPB_Proxy_Private* ppb_proxy_; | 106 const PPB_Proxy_Private* ppb_proxy_; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(HostDispatcher); | 108 DISALLOW_COPY_AND_ASSIGN(HostDispatcher); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 } // namespace proxy | 111 } // namespace proxy |
| 111 } // namespace pp | 112 } // namespace pp |
| 112 | 113 |
| 113 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ | 114 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ |
| OLD | NEW |