| 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 PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // The delegate pointer must outlive this class, ownership is not | 101 // The delegate pointer must outlive this class, ownership is not |
| 102 // transferred. | 102 // transferred. |
| 103 bool InitPluginWithChannel(PluginDelegate* delegate, | 103 bool InitPluginWithChannel(PluginDelegate* delegate, |
| 104 const IPC::ChannelHandle& channel_handle, | 104 const IPC::ChannelHandle& channel_handle, |
| 105 bool is_client); | 105 bool is_client); |
| 106 | 106 |
| 107 // Dispatcher overrides. | 107 // Dispatcher overrides. |
| 108 virtual bool IsPlugin() const; | 108 virtual bool IsPlugin() const; |
| 109 virtual bool Send(IPC::Message* msg); | 109 virtual bool Send(IPC::Message* msg); |
| 110 | 110 |
| 111 // IPC::Channel::Listener implementation. | 111 // IPC::Listener implementation. |
| 112 virtual bool OnMessageReceived(const IPC::Message& msg); | 112 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 113 virtual void OnChannelError(); | 113 virtual void OnChannelError(); |
| 114 | 114 |
| 115 // Keeps track of which dispatcher to use for each instance, active instances | 115 // Keeps track of which dispatcher to use for each instance, active instances |
| 116 // and tracks associated data like the current size. | 116 // and tracks associated data like the current size. |
| 117 void DidCreateInstance(PP_Instance instance); | 117 void DidCreateInstance(PP_Instance instance); |
| 118 void DidDestroyInstance(PP_Instance instance); | 118 void DidDestroyInstance(PP_Instance instance); |
| 119 | 119 |
| 120 // Gets the data for an existing instance, or NULL if the instance id doesn't | 120 // Gets the data for an existing instance, or NULL if the instance id doesn't |
| 121 // correspond to a known instance. | 121 // correspond to a known instance. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // incognito mode. | 166 // incognito mode. |
| 167 bool incognito_; | 167 bool incognito_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 169 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace proxy | 172 } // namespace proxy |
| 173 } // namespace ppapi | 173 } // namespace ppapi |
| 174 | 174 |
| 175 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 175 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| OLD | NEW |