Index: mojo/bindings/js/handle.h |
diff --git a/mojo/bindings/js/handle.h b/mojo/bindings/js/handle.h |
index e0f00dd52a9762791c6fc7bd5edacaed3f8e3a10..4f0d9b5d120d886c2c7ee09887c3f502fa14b1b2 100644 |
--- a/mojo/bindings/js/handle.h |
+++ b/mojo/bindings/js/handle.h |
@@ -11,7 +11,8 @@ |
#include "gin/wrappable.h" |
#include "mojo/public/cpp/system/core.h" |
-namespace gin { |
+namespace mojo { |
+namespace js { |
class HandleCloseObserver; |
// Wrapper for mojo Handles exposed to JavaScript. This ensures the Handle |
@@ -41,6 +42,11 @@ class HandleWrapper : public gin::Wrappable<HandleWrapper> { |
ObserverList<HandleCloseObserver> close_observers_; |
}; |
+} // namespace js |
+} // namespace mojo |
+ |
+namespace gin { |
+ |
// Note: It's important to use this converter rather than the one for |
// MojoHandle, since that will do a simple int32 conversion. It's unfortunate |
// there's no way to prevent against accidental use. |
@@ -56,24 +62,24 @@ struct Converter<mojo::Handle> { |
// 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<gin::HandleWrapper> > { |
+struct Converter<gin::Handle<mojo::js::HandleWrapper> > { |
static v8::Handle<v8::Value> ToV8( |
- v8::Isolate* isolate, const gin::Handle<gin::HandleWrapper>& val) { |
+ v8::Isolate* isolate, const gin::Handle<mojo::js::HandleWrapper>& val) { |
return val.ToV8(); |
} |
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val, |
- gin::Handle<gin::HandleWrapper>* out) { |
+ gin::Handle<mojo::js::HandleWrapper>* out) { |
if (val->IsNull()) { |
- *out = HandleWrapper::Create(isolate, MOJO_HANDLE_INVALID); |
+ *out = mojo::js::HandleWrapper::Create(isolate, MOJO_HANDLE_INVALID); |
return true; |
} |
- gin::HandleWrapper* object = NULL; |
- if (!Converter<gin::HandleWrapper*>::FromV8(isolate, val, &object)) { |
+ mojo::js::HandleWrapper* object = NULL; |
+ if (!Converter<mojo::js::HandleWrapper*>::FromV8(isolate, val, &object)) { |
return false; |
} |
- *out = gin::Handle<gin::HandleWrapper>(val, object); |
+ *out = gin::Handle<mojo::js::HandleWrapper>(val, object); |
return true; |
} |
}; |