Index: mojo/edk/js/handle.h |
diff --git a/third_party/mojo/src/mojo/edk/js/handle.h b/mojo/edk/js/handle.h |
similarity index 79% |
copy from third_party/mojo/src/mojo/edk/js/handle.h |
copy to mojo/edk/js/handle.h |
index 00f258fd9554be59010babf9c33d68992df36492..9fa92b0a29aa46b7223132947a0b20280b5e55d7 100644 |
--- a/third_party/mojo/src/mojo/edk/js/handle.h |
+++ b/mojo/edk/js/handle.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef THIRD_PARTY_MOJO_SRC_MOJO_EDK_JS_HANDLE_H_ |
-#define THIRD_PARTY_MOJO_SRC_MOJO_EDK_JS_HANDLE_H_ |
+#ifndef MOJO_EDK_JS_HANDLE_H_ |
+#define MOJO_EDK_JS_HANDLE_H_ |
#include "base/observer_list.h" |
#include "gin/converter.h" |
@@ -12,7 +12,7 @@ |
#include "mojo/public/cpp/system/core.h" |
namespace mojo { |
-namespace js { |
+namespace edk { |
class HandleCloseObserver; |
// Wrapper for mojo Handles exposed to JavaScript. This ensures the Handle |
@@ -42,7 +42,7 @@ class HandleWrapper : public gin::Wrappable<HandleWrapper> { |
base::ObserverList<HandleCloseObserver> close_observers_; |
}; |
-} // namespace js |
+} // namespace edk |
} // namespace mojo |
namespace gin { |
@@ -71,28 +71,29 @@ 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::js::HandleWrapper> > { |
+struct Converter<gin::Handle<mojo::edk::HandleWrapper> > { |
static v8::Handle<v8::Value> ToV8( |
- v8::Isolate* isolate, const gin::Handle<mojo::js::HandleWrapper>& val) { |
+ v8::Isolate* isolate, |
+ const gin::Handle<mojo::edk::HandleWrapper>& val) { |
return val.ToV8(); |
} |
static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val, |
- gin::Handle<mojo::js::HandleWrapper>* out) { |
+ gin::Handle<mojo::edk::HandleWrapper>* out) { |
if (val->IsNull()) { |
- *out = mojo::js::HandleWrapper::Create(isolate, MOJO_HANDLE_INVALID); |
+ *out = mojo::edk::HandleWrapper::Create(isolate, MOJO_HANDLE_INVALID); |
return true; |
} |
- mojo::js::HandleWrapper* object = NULL; |
- if (!Converter<mojo::js::HandleWrapper*>::FromV8(isolate, val, &object)) { |
+ mojo::edk::HandleWrapper* object = NULL; |
+ if (!Converter<mojo::edk::HandleWrapper*>::FromV8(isolate, val, &object)) { |
return false; |
} |
- *out = gin::Handle<mojo::js::HandleWrapper>(val, object); |
+ *out = gin::Handle<mojo::edk::HandleWrapper>(val, object); |
return true; |
} |
}; |
} // namespace gin |
-#endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_JS_HANDLE_H_ |
+#endif // MOJO_EDK_JS_HANDLE_H_ |