| 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 #include "ppapi/proxy/host_dispatcher.h" | 5 #include "ppapi/proxy/host_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "ppapi/c/private/ppb_proxy_private.h" | 9 #include "ppapi/c/private/ppb_proxy_private.h" |
| 10 #include "ppapi/c/ppb_var.h" | 10 #include "ppapi/c/ppb_var.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 const void* proxied_interface = | 217 const void* proxied_interface = |
| 218 InterfaceList::GetInstance()->GetInterfaceForPPP(iface_name); | 218 InterfaceList::GetInstance()->GetInterfaceForPPP(iface_name); |
| 219 if (!proxied_interface) | 219 if (!proxied_interface) |
| 220 return NULL; // Don't have a proxy for this interface, don't query further. | 220 return NULL; // Don't have a proxy for this interface, don't query further. |
| 221 | 221 |
| 222 PluginSupportedMap::iterator iter(plugin_supported_.find(iface_name)); | 222 PluginSupportedMap::iterator iter(plugin_supported_.find(iface_name)); |
| 223 if (iter == plugin_supported_.end()) { | 223 if (iter == plugin_supported_.end()) { |
| 224 // Need to query. Cache the result so we only do this once. | 224 // Need to query. Cache the result so we only do this once. |
| 225 bool supported = false; | 225 bool supported = false; |
| 226 | 226 |
| 227 bool previous_reentrancy_value = allow_plugin_reentrancy_; | |
| 228 allow_plugin_reentrancy_ = true; | |
| 229 Send(new PpapiMsg_SupportsInterface(iface_name, &supported)); | 227 Send(new PpapiMsg_SupportsInterface(iface_name, &supported)); |
| 230 allow_plugin_reentrancy_ = previous_reentrancy_value; | |
| 231 | 228 |
| 232 std::pair<PluginSupportedMap::iterator, bool> iter_success_pair; | 229 std::pair<PluginSupportedMap::iterator, bool> iter_success_pair; |
| 233 iter_success_pair = plugin_supported_.insert( | 230 iter_success_pair = plugin_supported_.insert( |
| 234 PluginSupportedMap::value_type(iface_name, supported)); | 231 PluginSupportedMap::value_type(iface_name, supported)); |
| 235 iter = iter_success_pair.first; | 232 iter = iter_success_pair.first; |
| 236 } | 233 } |
| 237 if (iter->second) | 234 if (iter->second) |
| 238 return proxied_interface; | 235 return proxied_interface; |
| 239 return NULL; | 236 return NULL; |
| 240 } | 237 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 281 } |
| 285 } | 282 } |
| 286 | 283 |
| 287 ScopedModuleReference::~ScopedModuleReference() { | 284 ScopedModuleReference::~ScopedModuleReference() { |
| 288 if (dispatcher_) | 285 if (dispatcher_) |
| 289 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); | 286 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); |
| 290 } | 287 } |
| 291 | 288 |
| 292 } // namespace proxy | 289 } // namespace proxy |
| 293 } // namespace ppapi | 290 } // namespace ppapi |
| OLD | NEW |