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

Unified Diff: mojo/public/cpp/bindings/binding.h

Issue 711413005: Use WeakBindingSet to manage inspector connections (Closed) Base URL: git@github.com:domokit/mojo.git@connector
Patch Set: Created 6 years, 1 month 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 | « no previous file | sky/services/inspector/server.cc » ('j') | sky/services/inspector/server.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/binding.h
diff --git a/mojo/public/cpp/bindings/binding.h b/mojo/public/cpp/bindings/binding.h
index 9f9c7125296086ec52fb31811fc59049d8abde8e..d3f0419958b7fca8ba3bb3b84a063abbd327e591 100644
--- a/mojo/public/cpp/bindings/binding.h
+++ b/mojo/public/cpp/bindings/binding.h
@@ -34,7 +34,6 @@ namespace mojo {
// private:
// Binding<Foo> binding_;
// };
-//
template <typename Interface>
class Binding : public ErrorHandler {
public:
@@ -106,6 +105,11 @@ class Binding : public ErrorHandler {
return internal_router_->WaitForIncomingMessage();
}
+ void Close() {
+ MOJO_DCHECK(internal_router_);
+ internal_router_->CloseMessagePipe();
+ }
+
void set_error_handler(ErrorHandler* error_handler) {
error_handler_ = error_handler;
}
« no previous file with comments | « no previous file | sky/services/inspector/server.cc » ('j') | sky/services/inspector/server.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698