Index: mojo/public/cpp/bindings/lib/interface_ptr_internal.cc |
diff --git a/mojo/public/cpp/bindings/lib/interface_ptr_internal.cc b/mojo/public/cpp/bindings/lib/interface_ptr_internal.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ee7b86d3fb7bfe020f7d2e9670a831757a3eb256 |
--- /dev/null |
+++ b/mojo/public/cpp/bindings/lib/interface_ptr_internal.cc |
@@ -0,0 +1,31 @@ |
+// 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. |
+ |
+#include "mojo/public/cpp/bindings/lib/interface_ptr_internal.h" |
+ |
+namespace mojo { |
+namespace internal { |
+ |
+InterfacePtrContext::InterfacePtrContext(ScopedMessagePipeHandle handle, |
+ MojoAsyncWaiter* waiter) |
+ : router_(handle.Pass(), waiter) { |
+} |
+ |
+InterfacePtrContext::~InterfacePtrContext() { |
+} |
+ |
+#ifndef NDEBUG |
+static int s_detached_state_count = 0; |
+ |
+int GetDetachedStateCount() { |
+ return s_detached_state_count; |
+} |
+ |
+void LogDetachedState(void* address, int count) { |
+ s_detached_state_count += count; // XXX probably needs to be threadsafe |
+} |
+#endif // NDEBUG |
+ |
+} // namespace internal |
+} // namespace mojo |