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

Unified Diff: src/trusted/plugin/pnacl_thread_args.h

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/pnacl_srpc_lib.cc ('k') | src/trusted/plugin/ppapi.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/pnacl_thread_args.h
diff --git a/src/trusted/plugin/pnacl_thread_args.h b/src/trusted/plugin/pnacl_thread_args.h
deleted file mode 100644
index ae766c3aafd6cf8313394f139a1a8284cdf27f72..0000000000000000000000000000000000000000
--- a/src/trusted/plugin/pnacl_thread_args.h
+++ /dev/null
@@ -1,97 +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.
-
-#ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_THREAD_ARGS_H_
-#define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_THREAD_ARGS_H_
-
-#include "native_client/src/trusted/plugin/plugin_error.h"
-
-#include "ppapi/cpp/completion_callback.h"
-
-namespace plugin {
-
-class BrowserInterface;
-class NaClSubprocess;
-class PnaclCoordinator;
-
-// Base structure for storing pnacl helper thread arguments.
-struct PnaclThreadArgs {
- PnaclThreadArgs(NaClSubprocess* subprocess_,
- BrowserInterface* browser_,
- pp::CompletionCallback finish_cb_)
- : should_die(false),
- subprocess(subprocess_),
- browser(browser_),
- finish_cb(finish_cb_) {
- }
-
- // Bool to signal to the thread that it should end whenever possible.
- bool should_die;
-
- // SRPC Nexe subprocess that does the work.
- NaClSubprocess* subprocess;
- // Browser Interface for SRPC setup.
- BrowserInterface* browser;
-
- // Callback to run when task is completed or an error has occurred.
- pp::CompletionCallback finish_cb;
-
- ErrorInfo error_info;
-};
-
-//----------------------------------------------------------------------
-// Helper thread arguments.
-
-// TODO(jvoung): Move these to the compile / link files when we separate
-// those bits from pnacl_coordinator.
-
-// Arguments needed to run LLVM in a separate thread, to go from
-// bitcode -> object file. This prevents LLVM from blocking the main thread.
-struct DoTranslateArgs : PnaclThreadArgs {
- DoTranslateArgs(NaClSubprocess* subprocess_,
- BrowserInterface* browser_,
- pp::CompletionCallback finish_cb_,
- nacl::DescWrapper* pexe_fd_)
- : PnaclThreadArgs(subprocess_, browser_, finish_cb_),
- pexe_fd(pexe_fd_),
- obj_fd(kNaClSrpcInvalidImcDesc),
- obj_len(-1) {
- }
-
- // Borrowed references which must outlive the thread.
- nacl::DescWrapper* pexe_fd;
-
- // Output.
- NaClSrpcImcDescType obj_fd;
- int32_t obj_len;
-};
-
-// Arguments needed to run LD in a separate thread, to go from
-// object file -> nexe.
-struct DoLinkArgs : PnaclThreadArgs {
- DoLinkArgs(NaClSubprocess* subprocess_,
- BrowserInterface* browser_,
- pp::CompletionCallback finish_cb_,
- PnaclCoordinator* coordinator_,
- nacl::DescWrapper* obj_fd_,
- int32_t obj_len_)
- : PnaclThreadArgs(subprocess_, browser_, finish_cb_),
- coordinator(coordinator_),
- obj_fd(obj_fd_),
- obj_len(obj_len_),
- nexe_fd(kNaClSrpcInvalidImcDesc) {
- }
- PnaclCoordinator* coordinator; // Punch hole in abstraction.
-
- // Borrowed references which must outlive the thread.
- nacl::DescWrapper* obj_fd;
- int32_t obj_len;
-
- // Output.
- NaClSrpcImcDescType nexe_fd;
-};
-
-
-} // namespace plugin;
-#endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_THREAD_ARGS_H_
« no previous file with comments | « src/trusted/plugin/pnacl_srpc_lib.cc ('k') | src/trusted/plugin/ppapi.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698