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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 bool incognito() const { return incognito_; } | 168 bool incognito() const { return incognito_; } |
169 | 169 |
170 private: | 170 private: |
171 friend class PluginDispatcherTest; | 171 friend class PluginDispatcherTest; |
172 | 172 |
173 // Notifies all live instances that they're now closed. This is used when | 173 // Notifies all live instances that they're now closed. This is used when |
174 // a renderer crashes or some other error is received. | 174 // a renderer crashes or some other error is received. |
175 void ForceFreeAllInstances(); | 175 void ForceFreeAllInstances(); |
176 | 176 |
177 // IPC message handlers. | 177 // IPC message handlers. |
178 void OnMsgIsInterfaceSupported( | 178 void OnMsgSupportsInterface(const std::string& interface_name, bool* result); |
179 const std::string& interface_name, bool* result); | |
180 void OnMsgSetPreferences(const Preferences& prefs); | 179 void OnMsgSetPreferences(const Preferences& prefs); |
181 | 180 |
182 virtual bool SendMessage(IPC::Message* msg); | 181 virtual bool SendMessage(IPC::Message* msg); |
183 | 182 |
184 PluginDelegate* plugin_delegate_; | 183 PluginDelegate* plugin_delegate_; |
185 | 184 |
186 // Contains all the plugin interfaces we've queried. The mapped value will | 185 // Contains all the plugin interfaces we've queried. The mapped value will |
187 // be the pointer to the interface pointer supplied by the plugin if it's | 186 // be the pointer to the interface pointer supplied by the plugin if it's |
188 // supported, or NULL if it's not supported. This allows us to cache failures | 187 // supported, or NULL if it's not supported. This allows us to cache failures |
189 // and not req-query if a plugin doesn't support the interface. | 188 // and not req-query if a plugin doesn't support the interface. |
(...skipping 17 matching lines...) Expand all Loading... |
207 // A filter for sending messages from threads other than the main thread. | 206 // A filter for sending messages from threads other than the main thread. |
208 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; | 207 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; |
209 | 208 |
210 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 209 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
211 }; | 210 }; |
212 | 211 |
213 } // namespace proxy | 212 } // namespace proxy |
214 } // namespace ppapi | 213 } // namespace ppapi |
215 | 214 |
216 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 215 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
OLD | NEW |