summaryrefslogtreecommitdiffstats
path: root/chrome/nacl/nacl_thread.h
diff options
context:
space:
mode:
authorgregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 01:22:10 +0000
committergregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 01:22:10 +0000
commit08a3ef61e987b2347bdd1bacc6252aa2a323b5ad (patch)
treec1e3827e0884742b906bed0d005fcd931d570069 /chrome/nacl/nacl_thread.h
parentd579d4cb281fd64e598454bcc3123fdb86c216b4 (diff)
downloadchromium_src-08a3ef61e987b2347bdd1bacc6252aa2a323b5ad.zip
chromium_src-08a3ef61e987b2347bdd1bacc6252aa2a323b5ad.tar.gz
chromium_src-08a3ef61e987b2347bdd1bacc6252aa2a323b5ad.tar.bz2
First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandbox
Review URL: http://codereview.chromium.org/153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl/nacl_thread.h')
-rw-r--r--chrome/nacl/nacl_thread.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/chrome/nacl/nacl_thread.h b/chrome/nacl/nacl_thread.h
new file mode 100644
index 0000000..a69ce3a
--- /dev/null
+++ b/chrome/nacl/nacl_thread.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2006-2009 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.
+
+#ifndef CHROME_NACL_NACL_THREAD_H_
+#define CHROME_NACL_NACL_THREAD_H_
+
+#include "base/file_path.h"
+#include "base/native_library.h"
+#include "chrome/common/child_thread.h"
+#include "chrome/common/nacl_types.h"
+
+class NotificationService;
+
+// The NaClThread class represents a background thread where NaCl app gets
+// started.
+class NaClThread : public ChildThread {
+ public:
+ NaClThread();
+ ~NaClThread();
+ // Returns the one NaCl thread.
+ static NaClThread* current();
+
+ private:
+ virtual void OnControlMessageReceived(const IPC::Message& msg);
+ void OnStartSelLdr(const int channel_descriptor,
+ const nacl::FileDescriptor handle);
+ // TODO(gregoryd): do we need to override Cleanup as in PluginThread?
+
+ scoped_ptr<NotificationService> notification_service_;
+
+ DISALLOW_EVIL_CONSTRUCTORS(NaClThread);
+};
+
+#endif // CHROME_NACL_NACL_THREAD_H_