| 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 "webkit/plugins/ppapi/plugin_module.h" | 5 #include "webkit/plugins/ppapi/plugin_module.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // module, and one or more instances are added later. In this case, the | 511 // module, and one or more instances are added later. In this case, the |
| 512 // PluginInstance was already created as in-process, so we missed the proxy | 512 // PluginInstance was already created as in-process, so we missed the proxy |
| 513 // AddInstance step and must do it now. | 513 // AddInstance step and must do it now. |
| 514 out_of_process_proxy_->AddInstance(plugin_instance->pp_instance()); | 514 out_of_process_proxy_->AddInstance(plugin_instance->pp_instance()); |
| 515 // In NaCl, we need to tell the instance to reset itself as proxied. This will | 515 // In NaCl, we need to tell the instance to reset itself as proxied. This will |
| 516 // clear cached interface pointers and send DidCreate (etc) to the plugin | 516 // clear cached interface pointers and send DidCreate (etc) to the plugin |
| 517 // side of the proxy. | 517 // side of the proxy. |
| 518 return plugin_instance->ResetAsProxied(this); | 518 return plugin_instance->ResetAsProxied(this); |
| 519 } | 519 } |
| 520 | 520 |
| 521 bool PluginModule::IsProxied() const { |
| 522 return !!out_of_process_proxy_; |
| 523 } |
| 524 |
| 521 // static | 525 // static |
| 522 const PPB_Core* PluginModule::GetCore() { | 526 const PPB_Core* PluginModule::GetCore() { |
| 523 return &core_interface; | 527 return &core_interface; |
| 524 } | 528 } |
| 525 | 529 |
| 526 // static | 530 // static |
| 527 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { | 531 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { |
| 528 return &GetInterface; | 532 return &GetInterface; |
| 529 } | 533 } |
| 530 | 534 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 623 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 620 if (retval != 0) { | 624 if (retval != 0) { |
| 621 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 625 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 622 return false; | 626 return false; |
| 623 } | 627 } |
| 624 return true; | 628 return true; |
| 625 } | 629 } |
| 626 | 630 |
| 627 } // namespace ppapi | 631 } // namespace ppapi |
| 628 } // namespace webkit | 632 } // namespace webkit |
| OLD | NEW |