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

Unified Diff: mojo/bindings/js/handle.cc

Issue 651523002: [Mojo] Fix the namespace for HandleWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/bindings/js/handle.h ('k') | mojo/bindings/js/handle_close_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/bindings/js/handle.cc
diff --git a/mojo/bindings/js/handle.cc b/mojo/bindings/js/handle.cc
index a25a911c573c35ecbb9545ac01bd632579d20dc4..baa1baea3a2eb92788fe72d03816b225012cb554 100644
--- a/mojo/bindings/js/handle.cc
+++ b/mojo/bindings/js/handle.cc
@@ -6,7 +6,8 @@
#include "mojo/bindings/js/handle_close_observer.h"
-namespace gin {
+namespace mojo {
+namespace js {
gin::WrapperInfo HandleWrapper::kWrapperInfo = { gin::kEmbedderNativeGin };
@@ -38,11 +39,16 @@ void HandleWrapper::NotifyCloseObservers() {
FOR_EACH_OBSERVER(HandleCloseObserver, close_observers_, OnWillCloseHandle());
}
+} // namespace js
+} // namespace mojo
+
+namespace gin {
+
v8::Handle<v8::Value> Converter<mojo::Handle>::ToV8(v8::Isolate* isolate,
const mojo::Handle& val) {
if (!val.is_valid())
return v8::Null(isolate);
- return HandleWrapper::Create(isolate, val.value()).ToV8();
+ return mojo::js::HandleWrapper::Create(isolate, val.value()).ToV8();
}
bool Converter<mojo::Handle>::FromV8(v8::Isolate* isolate,
@@ -53,8 +59,9 @@ bool Converter<mojo::Handle>::FromV8(v8::Isolate* isolate,
return true;
}
- gin::Handle<HandleWrapper> handle;
- if (!Converter<gin::Handle<HandleWrapper> >::FromV8(isolate, val, &handle))
+ gin::Handle<mojo::js::HandleWrapper> handle;
+ if (!Converter<gin::Handle<mojo::js::HandleWrapper> >::FromV8(
+ isolate, val, &handle))
return false;
*out = handle->get();
« no previous file with comments | « mojo/bindings/js/handle.h ('k') | mojo/bindings/js/handle_close_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698