| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 PluginModule::EntryPoints::EntryPoints() | 400 PluginModule::EntryPoints::EntryPoints() |
| 401 : get_interface(NULL), | 401 : get_interface(NULL), |
| 402 initialize_module(NULL), | 402 initialize_module(NULL), |
| 403 shutdown_module(NULL) { | 403 shutdown_module(NULL) { |
| 404 } | 404 } |
| 405 | 405 |
| 406 // PluginModule ---------------------------------------------------------------- | 406 // PluginModule ---------------------------------------------------------------- |
| 407 | 407 |
| 408 PluginModule::PluginModule(const std::string& name, | 408 PluginModule::PluginModule(const std::string& name, |
| 409 const FilePath& path, | 409 const FilePath& path, |
| 410 PluginDelegate::ModuleLifetime* lifetime_delegate) | 410 PluginDelegate::ModuleLifetime* lifetime_delegate, |
| 411 const ::ppapi::PpapiPermissions& perms) |
| 411 : lifetime_delegate_(lifetime_delegate), | 412 : lifetime_delegate_(lifetime_delegate), |
| 412 callback_tracker_(new ::ppapi::CallbackTracker), | 413 callback_tracker_(new ::ppapi::CallbackTracker), |
| 413 is_in_destructor_(false), | 414 is_in_destructor_(false), |
| 414 is_crashed_(false), | 415 is_crashed_(false), |
| 415 broker_(NULL), | 416 broker_(NULL), |
| 416 library_(NULL), | 417 library_(NULL), |
| 417 name_(name), | 418 name_(name), |
| 418 path_(path), | 419 path_(path), |
| 420 permissions_(perms), |
| 419 reserve_instance_id_(NULL), | 421 reserve_instance_id_(NULL), |
| 420 nacl_ipc_proxy_(false) { | 422 nacl_ipc_proxy_(false) { |
| 421 // Ensure the globals object is created. | 423 // Ensure the globals object is created. |
| 422 if (!host_globals) | 424 if (!host_globals) |
| 423 host_globals = new HostGlobals; | 425 host_globals = new HostGlobals; |
| 424 | 426 |
| 425 memset(&entry_points_, 0, sizeof(entry_points_)); | 427 memset(&entry_points_, 0, sizeof(entry_points_)); |
| 426 pp_module_ = HostGlobals::Get()->AddModule(this); | 428 pp_module_ = HostGlobals::Get()->AddModule(this); |
| 427 // Initialize the main thread message loop. | 429 // Initialize the main thread message loop. |
| 428 PpapiGlobals::Get()->GetMainThreadMessageLoop(); | 430 PpapiGlobals::Get()->GetMainThreadMessageLoop(); |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 616 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 615 if (retval != 0) { | 617 if (retval != 0) { |
| 616 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 618 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 617 return false; | 619 return false; |
| 618 } | 620 } |
| 619 return true; | 621 return true; |
| 620 } | 622 } |
| 621 | 623 |
| 622 } // namespace ppapi | 624 } // namespace ppapi |
| 623 } // namespace webkit | 625 } // namespace webkit |
| OLD | NEW |