| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // we're gone, so we don't want to tell it again. | 453 // we're gone, so we don't want to tell it again. |
| 454 lifetime_delegate_->PluginModuleDead(this); | 454 lifetime_delegate_->PluginModuleDead(this); |
| 455 } | 455 } |
| 456 | 456 |
| 457 // Don't add stuff here, the two notifications that the module object has | 457 // Don't add stuff here, the two notifications that the module object has |
| 458 // been deleted should be last. This allows, for example, | 458 // been deleted should be last. This allows, for example, |
| 459 // PPB_Proxy.IsInModuleDestructor to map PP_Module to this class during the | 459 // PPB_Proxy.IsInModuleDestructor to map PP_Module to this class during the |
| 460 // previous parts of the destructor. | 460 // previous parts of the destructor. |
| 461 } | 461 } |
| 462 | 462 |
| 463 void PluginModule::SetEmbedderState(scoped_ptr<EmbedderState> state) { |
| 464 embedder_state_ = state.Pass(); |
| 465 } |
| 466 |
| 467 PluginModule::EmbedderState* PluginModule::GetEmbedderState() { |
| 468 return embedder_state_.get(); |
| 469 } |
| 470 |
| 463 bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) { | 471 bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) { |
| 464 if (InitializeModule(entry_points)) { | 472 if (InitializeModule(entry_points)) { |
| 465 entry_points_ = entry_points; | 473 entry_points_ = entry_points; |
| 466 return true; | 474 return true; |
| 467 } | 475 } |
| 468 return false; | 476 return false; |
| 469 } | 477 } |
| 470 | 478 |
| 471 bool PluginModule::InitAsLibrary(const FilePath& path) { | 479 bool PluginModule::InitAsLibrary(const FilePath& path) { |
| 472 base::NativeLibrary library = base::LoadNativeLibrary(path, NULL); | 480 base::NativeLibrary library = base::LoadNativeLibrary(path, NULL); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 619 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 612 if (retval != 0) { | 620 if (retval != 0) { |
| 613 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 621 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 614 return false; | 622 return false; |
| 615 } | 623 } |
| 616 return true; | 624 return true; |
| 617 } | 625 } |
| 618 | 626 |
| 619 } // namespace ppapi | 627 } // namespace ppapi |
| 620 } // namespace webkit | 628 } // namespace webkit |
| OLD | NEW |