Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1228)

Unified Diff: src/trusted/plugin/module_ppapi.cc

Issue 7799028: Remove src/trusted/plugin (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix gyp file for necessary -I Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/plugin/method_map.cc ('k') | src/trusted/plugin/nacl_entry_points.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/module_ppapi.cc
diff --git a/src/trusted/plugin/module_ppapi.cc b/src/trusted/plugin/module_ppapi.cc
deleted file mode 100644
index a537bc8caa24a54639e5e03adee6be728acf1d53..0000000000000000000000000000000000000000
--- a/src/trusted/plugin/module_ppapi.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2011 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "native_client/src/shared/platform/nacl_time.h"
-#include "native_client/src/trusted/desc/nrd_all_modules.h"
-#include "native_client/src/trusted/handle_pass/browser_handle.h"
-#include "native_client/src/trusted/plugin/nacl_entry_points.h"
-#include "native_client/src/trusted/plugin/plugin.h"
-
-#include "ppapi/c/private/ppb_nacl_private.h"
-#include "ppapi/cpp/module.h"
-
-GetURandomFDFunc get_urandom_fd;
-
-namespace plugin {
-
-class ModulePpapi : public pp::Module {
- public:
- ModulePpapi() : pp::Module(), init_was_successful_(false) {
- PLUGIN_PRINTF(("ModulePpapi::ModulePpapi (this=%p)\n",
- static_cast<void*>(this)));
- }
-
- virtual ~ModulePpapi() {
- if (init_was_successful_) {
- NaClNrdAllModulesFini();
- }
- PLUGIN_PRINTF(("ModulePpapi::~ModulePpapi (this=%p)\n",
- static_cast<void*>(this)));
- }
-
- virtual bool Init() {
- // Ask the browser for an interface which provides missing functions
- const PPB_NaCl_Private* ptr = reinterpret_cast<const PPB_NaCl_Private*>(
- GetBrowserInterface(PPB_NACL_PRIVATE_INTERFACE));
-
- if (NULL == ptr) {
- PLUGIN_PRINTF(("ModulePpapi::Init failed: "
- "GetBrowserInterface returned NULL\n"));
- return false;
- }
-
- launch_nacl_process = reinterpret_cast<LaunchNaClProcessFunc>(
- ptr->LaunchSelLdr);
- get_urandom_fd = ptr->UrandomFD;
-
- // In the plugin, we don't need high resolution time of day.
- NaClAllowLowResolutionTimeOfDay();
- NaClNrdAllModulesInit();
-
-#if NACL_WINDOWS && !defined(NACL_STANDALONE)
- NaClHandlePassBrowserInit();
-#endif
- init_was_successful_ = true;
- return true;
- }
-
- virtual pp::Instance* CreateInstance(PP_Instance pp_instance) {
- PLUGIN_PRINTF(("ModulePpapi::CreateInstance (pp_instance=%"NACL_PRId32")\n",
- pp_instance));
- Plugin* plugin = Plugin::New(pp_instance);
- PLUGIN_PRINTF(("ModulePpapi::CreateInstance (return %p)\n",
- static_cast<void* >(plugin)));
- return plugin;
- }
-
- private:
- bool init_was_successful_;
-};
-
-} // namespace plugin
-
-
-namespace pp {
-
-Module* CreateModule() {
- PLUGIN_PRINTF(("CreateModule ()\n"));
- return new plugin::ModulePpapi();
-}
-
-} // namespace pp
« no previous file with comments | « src/trusted/plugin/method_map.cc ('k') | src/trusted/plugin/nacl_entry_points.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698