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

Unified Diff: third_party/WebKit/Source/platform/mojo/MojoHelper.h

Issue 2004643002: Implement BroadcastChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better tests Created 4 years, 7 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
Index: third_party/WebKit/Source/platform/mojo/MojoHelper.h
diff --git a/third_party/WebKit/Source/platform/mojo/MojoHelper.h b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
index be49353efad44073b68a043fbed0bfeb6c088826..55a2d47efd43652a79e08ee15443c4f6ebe93e30 100644
--- a/third_party/WebKit/Source/platform/mojo/MojoHelper.h
+++ b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/bindings/wtf_array.h"
+#include "platform/CrossThreadCopier.h"
#include "platform/heap/HeapAllocator.h"
#include <utility>
@@ -35,6 +36,13 @@ base::Callback<R(Args...)> createBaseCallback(std::unique_ptr<Function<R(Args...
return base::Bind(&internal::CallWTFFunction<R, Args...>, base::Owned(functor.release()));
}
+template <typename T>
+struct CrossThreadCopier<mojo::InterfaceRequest<T>> {
+ STATIC_ONLY(CrossThreadCopier);
+ using Type = mojo::InterfaceRequest<T>;
+ static Type copy(Type value) { return value; /* This is in fact a move. */ }
+};
+
} // namespace blink
namespace mojo {

Powered by Google App Engine
This is Rietveld 408576698