| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/src/shared/platform/nacl_time.h" | 7 #include "native_client/src/shared/platform/nacl_time.h" |
| 8 #include "native_client/src/trusted/desc/nrd_all_modules.h" | 8 #include "native_client/src/trusted/desc/nrd_all_modules.h" |
| 9 #include "native_client/src/trusted/handle_pass/browser_handle.h" | 9 #include "native_client/src/trusted/handle_pass/browser_handle.h" |
| 10 #include "native_client/src/trusted/plugin/nacl_entry_points.h" | 10 #include "native_client/src/trusted/plugin/nacl_entry_points.h" |
| 11 #include "native_client/src/trusted/plugin/plugin.h" | 11 #include "native_client/src/trusted/plugin/plugin.h" |
| 12 | 12 |
| 13 #include "ppapi/c/private/ppb_nacl_private.h" | 13 #include "ppapi/c/private/ppb_nacl_private.h" |
| 14 #include "ppapi/cpp/module.h" | 14 #include "ppapi/cpp/module.h" |
| 15 | 15 |
| 16 GetURandomFDFunc get_urandom_fd; | 16 GetURandomFDFunc get_urandom_fd; |
| 17 | 17 |
| 18 namespace plugin { | 18 namespace plugin { |
| 19 | 19 |
| 20 class ModulePpapi : public pp::Module { | 20 class ModulePpapi : public pp::Module { |
| 21 public: | 21 public: |
| 22 ModulePpapi() : pp::Module(), init_was_successful_(false) { | 22 ModulePpapi() : pp::Module(), |
| 23 init_was_successful_(false), |
| 24 private_interface_(NULL) { |
| 23 MODULE_PRINTF(("ModulePpapi::ModulePpapi (this=%p)\n", | 25 MODULE_PRINTF(("ModulePpapi::ModulePpapi (this=%p)\n", |
| 24 static_cast<void*>(this))); | 26 static_cast<void*>(this))); |
| 25 } | 27 } |
| 26 | 28 |
| 27 virtual ~ModulePpapi() { | 29 virtual ~ModulePpapi() { |
| 28 if (init_was_successful_) { | 30 if (init_was_successful_) { |
| 29 NaClSrpcModuleFini(); | 31 NaClSrpcModuleFini(); |
| 30 NaClNrdAllModulesFini(); | 32 NaClNrdAllModulesFini(); |
| 31 } | 33 } |
| 32 MODULE_PRINTF(("ModulePpapi::~ModulePpapi (this=%p)\n", | 34 MODULE_PRINTF(("ModulePpapi::~ModulePpapi (this=%p)\n", |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 83 |
| 82 | 84 |
| 83 namespace pp { | 85 namespace pp { |
| 84 | 86 |
| 85 Module* CreateModule() { | 87 Module* CreateModule() { |
| 86 MODULE_PRINTF(("CreateModule ()\n")); | 88 MODULE_PRINTF(("CreateModule ()\n")); |
| 87 return new plugin::ModulePpapi(); | 89 return new plugin::ModulePpapi(); |
| 88 } | 90 } |
| 89 | 91 |
| 90 } // namespace pp | 92 } // namespace pp |
| OLD | NEW |