summaryrefslogtreecommitdiffstats
path: root/mojo/system
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-10 20:52:11 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-10 20:52:11 +0000
commit6cf6ca58e053f69d88c90b55f3a9011a6caba801 (patch)
treea10d40846807d905cd014a933135f7856d430067 /mojo/system
parent6a91ffb0e9bafcde73e134aef4b635e2efeb71db (diff)
downloadchromium_src-6cf6ca58e053f69d88c90b55f3a9011a6caba801.zip
chromium_src-6cf6ca58e053f69d88c90b55f3a9011a6caba801.tar.gz
chromium_src-6cf6ca58e053f69d88c90b55f3a9011a6caba801.tar.bz2
Simple shell that loads a dll and calls an entrypoint function passing in a handle to a pipe created by the shell app.
To achieve this I had to make mojo_system a <(component) so sample_app.dll could link against it. Trung, Darin tells me you had a different idea about how to achieve this. Consider this CL a starting point for the discussion :-) R=darin@chromium.org BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227604 Review URL: https://codereview.chromium.org/25895002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227983 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/system')
-rw-r--r--mojo/system/core_impl.h2
-rw-r--r--mojo/system/dispatcher.h4
-rw-r--r--mojo/system/memory.cc6
-rw-r--r--mojo/system/memory.h5
-rw-r--r--mojo/system/message_pipe.h4
-rw-r--r--mojo/system/message_pipe_dispatcher.h3
-rw-r--r--mojo/system/simple_dispatcher.h3
-rw-r--r--mojo/system/waiter.h3
-rw-r--r--mojo/system/waiter_list.h3
9 files changed, 23 insertions, 10 deletions
diff --git a/mojo/system/core_impl.h b/mojo/system/core_impl.h
index 1417a06..aede29d 100644
--- a/mojo/system/core_impl.h
+++ b/mojo/system/core_impl.h
@@ -25,7 +25,7 @@ class CoreTestBase;
// the (obvious) exception of |Init()|, which must be called first (and the call
// completed) before making any other calls, all the public methods are
// thread-safe.
-class CoreImpl {
+class MOJO_SYSTEM_EXPORT CoreImpl {
public:
static void Init();
diff --git a/mojo/system/dispatcher.h b/mojo/system/dispatcher.h
index 6b44f6a..75f6a97 100644
--- a/mojo/system/dispatcher.h
+++ b/mojo/system/dispatcher.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "mojo/public/system/core.h"
+#include "mojo/public/system/system_export.h"
namespace mojo {
namespace system {
@@ -20,7 +21,8 @@ class Waiter;
// object is thread-safe, with its state being protected by a single lock
// |lock_|, which is also made available to implementation subclasses (via the
// |lock()| method).
-class Dispatcher : public base::RefCountedThreadSafe<Dispatcher> {
+class MOJO_SYSTEM_EXPORT Dispatcher :
+ public base::RefCountedThreadSafe<Dispatcher> {
public:
// These methods implement the various primitives named |Mojo...()|. These
// take |lock_| and handle races with |Close()|. Then they call out to
diff --git a/mojo/system/memory.cc b/mojo/system/memory.cc
index fe7edef..f20b61d 100644
--- a/mojo/system/memory.cc
+++ b/mojo/system/memory.cc
@@ -23,8 +23,10 @@ bool VerifyUserPointerForSize(const void* pointer, size_t count) {
}
// Explicitly instantiate the sizes we need. Add instantiations as needed.
-template bool VerifyUserPointerForSize<1>(const void*, size_t);
-template bool VerifyUserPointerForSize<4>(const void*, size_t);
+template MOJO_SYSTEM_EXPORT bool VerifyUserPointerForSize<1>(
+ const void*, size_t);
+template MOJO_SYSTEM_EXPORT bool VerifyUserPointerForSize<4>(
+ const void*, size_t);
} // namespace system
} // namespace mojo
diff --git a/mojo/system/memory.h b/mojo/system/memory.h
index cca3aca..963974a 100644
--- a/mojo/system/memory.h
+++ b/mojo/system/memory.h
@@ -7,6 +7,8 @@
#include <stddef.h>
+#include "mojo/public/system/system_export.h"
+
namespace mojo {
namespace system {
@@ -14,7 +16,8 @@ namespace system {
// instantiations in the .cc file. This is used by |VerifyUserPointer<T>()|
// below, and you should use that instead.
template <size_t size>
-bool VerifyUserPointerForSize(const void* pointer, size_t count);
+bool MOJO_SYSTEM_EXPORT VerifyUserPointerForSize(const void* pointer,
+ size_t count);
// Verify that |count * sizeof(T)| bytes can be read from the user |pointer|
// insofar as possible/necessary (note: this is done carefully since |count *
diff --git a/mojo/system/message_pipe.h b/mojo/system/message_pipe.h
index d8266f7..2be2acd 100644
--- a/mojo/system/message_pipe.h
+++ b/mojo/system/message_pipe.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "mojo/public/system/core.h"
+#include "mojo/public/system/system_export.h"
#include "mojo/system/waiter_list.h"
namespace mojo {
@@ -23,7 +24,8 @@ class Waiter;
// |MessagePipe| is the secondary object implementing a message pipe (see the
// explanatory comment in core_impl.cc), and is jointly owned by the two
// dispatchers passed in to the constructor. This class is thread-safe.
-class MessagePipe : public base::RefCountedThreadSafe<MessagePipe> {
+class MOJO_SYSTEM_EXPORT MessagePipe :
+ public base::RefCountedThreadSafe<MessagePipe> {
public:
MessagePipe();
diff --git a/mojo/system/message_pipe_dispatcher.h b/mojo/system/message_pipe_dispatcher.h
index b52ebb8..a0e2f09 100644
--- a/mojo/system/message_pipe_dispatcher.h
+++ b/mojo/system/message_pipe_dispatcher.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "mojo/public/system/system_export.h"
#include "mojo/system/dispatcher.h"
namespace mojo {
@@ -17,7 +18,7 @@ class MessagePipe;
// This is the |Dispatcher| implementation for message pipes (created by the
// Mojo primitive |MojoCreateMessagePipe()|). This class is thread-safe.
-class MessagePipeDispatcher : public Dispatcher {
+class MOJO_SYSTEM_EXPORT MessagePipeDispatcher : public Dispatcher {
public:
MessagePipeDispatcher();
diff --git a/mojo/system/simple_dispatcher.h b/mojo/system/simple_dispatcher.h
index f306aba..4ef37d1 100644
--- a/mojo/system/simple_dispatcher.h
+++ b/mojo/system/simple_dispatcher.h
@@ -8,6 +8,7 @@
#include <list>
#include "base/basictypes.h"
+#include "mojo/public/system/system_export.h"
#include "mojo/system/dispatcher.h"
#include "mojo/system/waiter_list.h"
@@ -18,7 +19,7 @@ namespace system {
// correspondence between handles and dispatchers (see the explanatory comment
// in core_impl.cc). This class implements the standard waiter-signalling
// mechanism in that case.
-class SimpleDispatcher : public Dispatcher {
+class MOJO_SYSTEM_EXPORT SimpleDispatcher : public Dispatcher {
protected:
SimpleDispatcher();
diff --git a/mojo/system/waiter.h b/mojo/system/waiter.h
index bdd33fc..a2e8076 100644
--- a/mojo/system/waiter.h
+++ b/mojo/system/waiter.h
@@ -9,6 +9,7 @@
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "mojo/public/system/core.h"
+#include "mojo/public/system/system_export.h"
namespace mojo {
namespace system {
@@ -17,7 +18,7 @@ namespace system {
// under other locks, in particular, |Dispatcher::lock_|s, so |Waiter| methods
// must never call out to other objects (in particular, |Dispatcher|s). This
// class is thread-safe.
-class Waiter {
+class MOJO_SYSTEM_EXPORT Waiter {
public:
Waiter();
~Waiter();
diff --git a/mojo/system/waiter_list.h b/mojo/system/waiter_list.h
index 23933e3..e23c138 100644
--- a/mojo/system/waiter_list.h
+++ b/mojo/system/waiter_list.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "mojo/public/system/core.h"
+#include "mojo/public/system/system_export.h"
namespace mojo {
namespace system {
@@ -22,7 +23,7 @@ class Waiter;
// object (see simple_dispatcher.* and the explanatory comment in core_impl.cc).
// This class is thread-unsafe (all concurrent access must be protected by some
// lock).
-class WaiterList {
+class MOJO_SYSTEM_EXPORT WaiterList {
public:
WaiterList();
~WaiterList();