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

Unified Diff: components/nacl/loader/nonsfi/nonsfi_listener.h

Issue 439713002: Refactoring: Split NaClListener into two delegated classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and redesign based on Mark's comment. Created 6 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 | « components/nacl/loader/nacl_trusted_listener.cc ('k') | components/nacl/loader/nonsfi/nonsfi_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nonsfi/nonsfi_listener.h
diff --git a/components/nacl/loader/nonsfi/nonsfi_listener.h b/components/nacl/loader/nonsfi/nonsfi_listener.h
new file mode 100644
index 0000000000000000000000000000000000000000..a2acc61a6308c371977254e04bb869059fbb7b09
--- /dev/null
+++ b/components/nacl/loader/nonsfi/nonsfi_listener.h
@@ -0,0 +1,53 @@
+// Copyright 2014 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 COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_
+#define COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_
+
+#include "base/macros.h"
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread.h"
+#include "ipc/ipc_listener.h"
+
+namespace IPC {
+class Message;
+class SyncChannel;
+} // namespace IPC
+
+class NaClTrustedListener;
+
+namespace nacl {
+
+struct NaClStartParams;
+
+namespace nonsfi {
+
+class NonSfiListener : public IPC::Listener {
+ public:
+ NonSfiListener();
+ virtual ~NonSfiListener();
+
+ // Listen for a request to launch a non-SFI NaCl module.
+ void Listen();
+ bool Send(IPC::Message* msg);
+
+ private:
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
+ void OnStart(const nacl::NaClStartParams& params);
+
+ base::Thread io_thread_;
+ base::WaitableEvent shutdown_event_;
+ scoped_ptr<IPC::SyncChannel> channel_;
+ scoped_refptr<NaClTrustedListener> trusted_listener_;
+
+ DISALLOW_COPY_AND_ASSIGN(NonSfiListener);
+};
+
+} // namespace nonsfi
+} // namespace nacl
+
+#endif // COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_
« no previous file with comments | « components/nacl/loader/nacl_trusted_listener.cc ('k') | components/nacl/loader/nonsfi/nonsfi_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698