diff options
author | sehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-21 00:41:22 +0000 |
---|---|---|
committer | sehr@google.com <sehr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-21 00:41:22 +0000 |
commit | d4362e74b269497a790eb19da357ed76fb0a2357 (patch) | |
tree | 37e1431c660612dbd1274c5a14fffa2d09d9b8ec /ppapi/native_client/src/trusted/plugin | |
parent | 111ddfd416270b46727961a82ba531c931f2c8f5 (diff) | |
download | chromium_src-d4362e74b269497a790eb19da357ed76fb0a2357.zip chromium_src-d4362e74b269497a790eb19da357ed76fb0a2357.tar.gz chromium_src-d4362e74b269497a790eb19da357ed76fb0a2357.tar.bz2 |
Revert 118553 - Add nacl private interface and state for process creation.
After invoking an interface method this will allow creation from other than
RenderThread.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9265027
TBR=sehr@google.com
Review URL: https://chromiumcodereview.appspot.com/9131027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client/src/trusted/plugin')
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/module_ppapi.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc index a59dcad..894dc37 100644 --- a/ppapi/native_client/src/trusted/plugin/module_ppapi.cc +++ b/ppapi/native_client/src/trusted/plugin/module_ppapi.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 The Chromium Authors. All rights reserved. + * Copyright (c) 2011 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -35,18 +35,18 @@ class ModulePpapi : public pp::Module { virtual bool Init() { // Ask the browser for an interface which provides missing functions - private_interface_ = reinterpret_cast<const PPB_NaCl_Private*>( + const PPB_NaCl_Private* ptr = reinterpret_cast<const PPB_NaCl_Private*>( GetBrowserInterface(PPB_NACL_PRIVATE_INTERFACE)); - if (NULL == private_interface_) { + if (NULL == ptr) { MODULE_PRINTF(("ModulePpapi::Init failed: " "GetBrowserInterface returned NULL\n")); return false; } launch_nacl_process = reinterpret_cast<LaunchNaClProcessFunc>( - private_interface_->LaunchSelLdr); - get_urandom_fd = private_interface_->UrandomFD; + ptr->LaunchSelLdr); + get_urandom_fd = ptr->UrandomFD; // In the plugin, we don't need high resolution time of day. NaClAllowLowResolutionTimeOfDay(); @@ -63,9 +63,6 @@ class ModulePpapi : public pp::Module { virtual pp::Instance* CreateInstance(PP_Instance pp_instance) { MODULE_PRINTF(("ModulePpapi::CreateInstance (pp_instance=%"NACL_PRId32")\n", pp_instance)); - // This must be called from here rather than Init, as it relies on - // chrome state that is not set at the time Init runs. - private_interface_->EnableBackgroundSelLdrLaunch(); Plugin* plugin = Plugin::New(pp_instance); MODULE_PRINTF(("ModulePpapi::CreateInstance (return %p)\n", static_cast<void* >(plugin))); @@ -74,7 +71,6 @@ class ModulePpapi : public pp::Module { private: bool init_was_successful_; - const PPB_NaCl_Private* private_interface_; }; } // namespace plugin |