| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 if (!is_crashed_) | 424 if (!is_crashed_) |
| 425 lifetime_delegate_->PluginModuleDead(this); | 425 lifetime_delegate_->PluginModuleDead(this); |
| 426 } | 426 } |
| 427 | 427 |
| 428 bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) { | 428 bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) { |
| 429 entry_points_ = entry_points; | 429 entry_points_ = entry_points; |
| 430 return InitializeModule(); | 430 return InitializeModule(); |
| 431 } | 431 } |
| 432 | 432 |
| 433 bool PluginModule::InitAsLibrary(const FilePath& path) { | 433 bool PluginModule::InitAsLibrary(const FilePath& path) { |
| 434 base::NativeLibrary library = base::LoadNativeLibrary(path); | 434 base::NativeLibrary library = base::LoadNativeLibrary(path, NULL); |
| 435 if (!library) | 435 if (!library) |
| 436 return false; | 436 return false; |
| 437 | 437 |
| 438 if (!LoadEntryPointsFromLibrary(library, &entry_points_) || | 438 if (!LoadEntryPointsFromLibrary(library, &entry_points_) || |
| 439 !InitializeModule()) { | 439 !InitializeModule()) { |
| 440 base::UnloadNativeLibrary(library); | 440 base::UnloadNativeLibrary(library); |
| 441 return false; | 441 return false; |
| 442 } | 442 } |
| 443 | 443 |
| 444 library_ = library; | 444 library_ = library; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 int retval = entry_points_.initialize_module(pp_module(), &GetInterface); | 546 int retval = entry_points_.initialize_module(pp_module(), &GetInterface); |
| 547 if (retval != 0) { | 547 if (retval != 0) { |
| 548 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 548 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 549 return false; | 549 return false; |
| 550 } | 550 } |
| 551 return true; | 551 return true; |
| 552 } | 552 } |
| 553 | 553 |
| 554 } // namespace ppapi | 554 } // namespace ppapi |
| 555 } // namespace webkit | 555 } // namespace webkit |
| OLD | NEW |