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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.h

Issue 8397001: Open NaCl IRT file only once at startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
Index: chrome/browser/nacl_host/nacl_process_host.h
diff --git a/chrome/browser/nacl_host/nacl_process_host.h b/chrome/browser/nacl_host/nacl_process_host.h
index 59f4f50730e615aaf54f2bccc34ebef26c6bdb22..fe065209ffd462795866a1d5aec00042c5c61d5a 100644
--- a/chrome/browser/nacl_host/nacl_process_host.h
+++ b/chrome/browser/nacl_host/nacl_process_host.h
@@ -28,6 +28,9 @@ class NaClProcessHost : public BrowserChildProcessHost {
explicit NaClProcessHost(const std::wstring& url);
virtual ~NaClProcessHost();
+ // Open the integrated runtime library file and save it for later.
+ static void OpenIrtLibraryFile();
+
// Initialize the new NaCl process, returning true on success.
bool Launch(ChromeRenderMessageFilter* chrome_render_message_filter,
int socket_count,
@@ -50,19 +53,17 @@ class NaClProcessHost : public BrowserChildProcessHost {
bool LaunchSelLdr();
- // Get the architecture-specific filename of NaCl's integrated
- // runtime (IRT) library, relative to the plugins directory.
- FilePath::StringType GetIrtLibraryFilename();
-
virtual void OnProcessLaunched();
- void OpenIrtFileDone(base::PlatformFileError error_code,
- base::PassPlatformFile file,
- bool created);
+ void SendStart(base::PlatformFile irt_file);
virtual bool CanShutdown();
+ static bool RunningOnWOW64();
+
private:
+ static base::PlatformFile irt_platform_file_;
+
// The ChromeRenderMessageFilter that requested this NaCl process. We use
// this for sending the reply once the process has started.
scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter_;
@@ -73,9 +74,6 @@ class NaClProcessHost : public BrowserChildProcessHost {
// Socket pairs for the NaCl process and renderer.
scoped_ptr<NaClInternal> internal_;
- // Windows platform flag
- bool running_on_wow64_;
-
base::WeakPtrFactory<NaClProcessHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);

Powered by Google App Engine
This is Rietveld 408576698