Chromium Code Reviews| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 | 133 |
| 134 // You must call this function before anything else. Returns true on success. | 134 // You must call this function before anything else. Returns true on success. |
| 135 // The delegate pointer must outlive this class, ownership is not | 135 // The delegate pointer must outlive this class, ownership is not |
| 136 // transferred. | 136 // transferred. |
| 137 bool InitPluginWithChannel(PluginDelegate* delegate, | 137 bool InitPluginWithChannel(PluginDelegate* delegate, |
| 138 base::ProcessId peer_pid, | 138 base::ProcessId peer_pid, |
| 139 const IPC::ChannelHandle& channel_handle, | 139 const IPC::ChannelHandle& channel_handle, |
| 140 bool is_client); | 140 bool is_client); |
| 141 | 141 |
| 142 // Dispatcher overrides. | 142 // Dispatcher overrides. |
| 143 virtual bool IsPlugin() const; | 143 virtual bool IsPlugin() const override; |
| 144 virtual bool Send(IPC::Message* msg); | 144 virtual bool Send(IPC::Message* msg) override; |
| 145 // Unlike |Send()|, this function continues to hold the Pepper proxy lock | |
| 146 // unconditionally. | |
| 147 virtual bool SendAndStayLocked(IPC::Message* msg) override; | |
| 145 | 148 |
| 146 // IPC::Listener implementation. | 149 // IPC::Listener implementation. |
| 147 virtual bool OnMessageReceived(const IPC::Message& msg); | 150 virtual bool OnMessageReceived(const IPC::Message& msg) override; |
| 148 virtual void OnChannelError(); | 151 virtual void OnChannelError() override; |
|
dmichael(do not use this one)
2014/10/31 14:49:32
The new guidance is to use only one of "virtual" o
Peng
2014/10/31 14:55:38
I see. Done
| |
| 149 | 152 |
| 150 // Keeps track of which dispatcher to use for each instance, active instances | 153 // Keeps track of which dispatcher to use for each instance, active instances |
| 151 // and tracks associated data like the current size. | 154 // and tracks associated data like the current size. |
| 152 void DidCreateInstance(PP_Instance instance); | 155 void DidCreateInstance(PP_Instance instance); |
| 153 void DidDestroyInstance(PP_Instance instance); | 156 void DidDestroyInstance(PP_Instance instance); |
| 154 | 157 |
| 155 // Gets the data for an existing instance, or NULL if the instance id doesn't | 158 // Gets the data for an existing instance, or NULL if the instance id doesn't |
| 156 // correspond to a known instance. | 159 // correspond to a known instance. |
| 157 InstanceData* GetInstanceData(PP_Instance instance); | 160 InstanceData* GetInstanceData(PP_Instance instance); |
| 158 | 161 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 // A filter for sending messages from threads other than the main thread. | 209 // A filter for sending messages from threads other than the main thread. |
| 207 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; | 210 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; |
| 208 | 211 |
| 209 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 212 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
| 210 }; | 213 }; |
| 211 | 214 |
| 212 } // namespace proxy | 215 } // namespace proxy |
| 213 } // namespace ppapi | 216 } // namespace ppapi |
| 214 | 217 |
| 215 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 218 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| OLD | NEW |