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

Unified Diff: mojo/public/cpp/bindings/lib/interface_ptr_internal.cc

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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: 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

Powered by Google App Engine
This is Rietveld 408576698