summaryrefslogtreecommitdiffstats
path: root/chrome/nacl/broker_thread.h
diff options
context:
space:
mode:
authorgregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 18:57:09 +0000
committergregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 18:57:09 +0000
commit103607e7bb3d18c9c5b78cf8dc558c2504047b1d (patch)
tree650fd33a0dfeded9eec339c24856307de5a86248 /chrome/nacl/broker_thread.h
parent20c01928492aca53ee6ba6e1c84a199e889cb74d (diff)
downloadchromium_src-103607e7bb3d18c9c5b78cf8dc558c2504047b1d.zip
chromium_src-103607e7bb3d18c9c5b78cf8dc558c2504047b1d.tar.gz
chromium_src-103607e7bb3d18c9c5b78cf8dc558c2504047b1d.tar.bz2
Implement the broker process that launches NaCl loader processes on 64-bit Windows systems.
BUG=28176 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=37578 Review URL: http://codereview.chromium.org/542030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37720 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl/broker_thread.h')
-rw-r--r--chrome/nacl/broker_thread.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/nacl/broker_thread.h b/chrome/nacl/broker_thread.h
new file mode 100644
index 0000000..d88919f
--- /dev/null
+++ b/chrome/nacl/broker_thread.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2010 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_BROKER_THREAD_H_
+#define CHROME_NACL_BROKER_THREAD_H_
+
+#include "chrome/common/child_thread.h"
+#include "chrome/common/nacl_types.h"
+
+#if defined(OS_WIN)
+#include "sandbox/src/sandbox.h"
+#endif
+
+// The BrokerThread class represents the thread that handles the messages from
+// the browser process and starts NaCl loader processes.
+class NaClBrokerThread : public ChildThread {
+ public:
+ NaClBrokerThread();
+ ~NaClBrokerThread();
+ // Returns the one NaCl thread.
+ static NaClBrokerThread* current();
+
+ virtual void OnChannelConnected(int32 peer_pid);
+
+ private:
+ virtual void OnControlMessageReceived(const IPC::Message& msg);
+ void OnLaunchLoaderThroughBroker(const std::wstring& loader_channel_id);
+ void OnShareBrowserHandle(int browser_handle);
+
+ base::ProcessHandle browser_handle_;
+ sandbox::BrokerServices* broker_services_;
+
+ DISALLOW_COPY_AND_ASSIGN(NaClBrokerThread);
+};
+
+#endif // CHROME_NACL_BROKER_THREAD_H_