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

Unified Diff: mojo/public/bindings/lib/callback_internal.h

Issue 220243007: Mojo: Move mojo/public/bindings/lib to mojo/public/cpp/bindings/lib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/public/bindings/lib/buffer.cc ('k') | mojo/public/bindings/lib/connector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/lib/callback_internal.h
diff --git a/mojo/public/bindings/lib/callback_internal.h b/mojo/public/bindings/lib/callback_internal.h
deleted file mode 100644
index 4e7e9967886f88fa7ea46aa55188fd9aca384301..0000000000000000000000000000000000000000
--- a/mojo/public/bindings/lib/callback_internal.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_BINDINGS_LIB_CALLBACK_INTERNAL_H_
-#define MOJO_PUBLIC_BINDINGS_LIB_CALLBACK_INTERNAL_H_
-
-#include "mojo/public/bindings/lib/bindings_internal.h"
-
-namespace mojo {
-namespace internal {
-
-template <typename T, bool is_object_type = TypeTraits<T>::kIsObject>
-struct Callback_ParamTraits {};
-
-template <typename T>
-struct Callback_ParamTraits<T, true> {
- typedef const T& ForwardType;
- static const bool kIsScopedHandle = false;
-};
-
-template <typename T>
-struct Callback_ParamTraits<T, false> {
- typedef T ForwardType;
- static const bool kIsScopedHandle = false;
-};
-
-template <typename H>
-struct Callback_ParamTraits<ScopedHandleBase<H>, true> {
- typedef ScopedHandleBase<H> ForwardType;
- static const bool kIsScopedHandle = true;
-};
-
-template<bool B, typename T = void>
-struct EnableIf {};
-
-template<typename T>
-struct EnableIf<true, T> { typedef T type; };
-
-template <typename T>
-typename EnableIf<!Callback_ParamTraits<T>::kIsScopedHandle, T>::type&
- Callback_Forward(T& t) {
- return t;
-}
-
-template <typename T>
-typename EnableIf<Callback_ParamTraits<T>::kIsScopedHandle, T>::type
- Callback_Forward(T& t) {
- return t.Pass();
-}
-
-} // namespace internal
-} // namespace mojo
-
-#endif // MOJO_PUBLIC_BINDINGS_LIB_CALLBACK_INTERNAL_H_
« no previous file with comments | « mojo/public/bindings/lib/buffer.cc ('k') | mojo/public/bindings/lib/connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698