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

Unified Diff: mojo/edk/js/handle.h

Issue 2405903003: Make //mojo/edk/js a component. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « mojo/edk/js/core.h ('k') | mojo/edk/js/js_export.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/js/handle.h
diff --git a/mojo/edk/js/handle.h b/mojo/edk/js/handle.h
index 2470fac9f11d93396abbf1cc7bed8f5f585bb6b8..60652ed8c2cc49a07d373b8d1c18bba2b67d99a5 100644
--- a/mojo/edk/js/handle.h
+++ b/mojo/edk/js/handle.h
@@ -11,6 +11,7 @@
#include "gin/converter.h"
#include "gin/handle.h"
#include "gin/wrappable.h"
+#include "mojo/edk/js/js_export.h"
#include "mojo/public/cpp/system/core.h"
namespace mojo {
@@ -21,7 +22,7 @@ class HandleCloseObserver;
// Wrapper for mojo Handles exposed to JavaScript. This ensures the Handle
// is Closed when its JS object is garbage collected.
-class HandleWrapper : public gin::Wrappable<HandleWrapper> {
+class MOJO_JS_EXPORT HandleWrapper : public gin::Wrappable<HandleWrapper> {
public:
static gin::WrapperInfo kWrapperInfo;
@@ -56,16 +57,16 @@ namespace gin {
// MojoHandle, since that will do a simple int32_t conversion. It's unfortunate
// there's no way to prevent against accidental use.
// TODO(mpcomplete): define converters for all Handle subtypes.
-template<>
-struct Converter<mojo::Handle> {
+template <>
+struct MOJO_JS_EXPORT Converter<mojo::Handle> {
static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
const mojo::Handle& val);
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
mojo::Handle* out);
};
-template<>
-struct Converter<mojo::MessagePipeHandle> {
+template <>
+struct MOJO_JS_EXPORT Converter<mojo::MessagePipeHandle> {
static v8::Handle<v8::Value> ToV8(v8::Isolate* isolate,
mojo::MessagePipeHandle val);
static bool FromV8(v8::Isolate* isolate,
@@ -76,7 +77,7 @@ struct Converter<mojo::MessagePipeHandle> {
// We need to specialize the normal gin::Handle converter in order to handle
// converting |null| to a wrapper for an empty mojo::Handle.
template <>
-struct Converter<gin::Handle<mojo::edk::js::HandleWrapper>> {
+struct MOJO_JS_EXPORT Converter<gin::Handle<mojo::edk::js::HandleWrapper>> {
static v8::Handle<v8::Value> ToV8(
v8::Isolate* isolate,
const gin::Handle<mojo::edk::js::HandleWrapper>& val) {
« no previous file with comments | « mojo/edk/js/core.h ('k') | mojo/edk/js/js_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698