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

Unified Diff: services/shell/public/cpp/lib/interface_registry.cc

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
Patch Set: . Created 4 years, 6 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: services/shell/public/cpp/lib/interface_registry.cc
diff --git a/services/shell/public/cpp/lib/interface_registry.cc b/services/shell/public/cpp/lib/interface_registry.cc
index a4657b24e8304fc825e1892fffb2367a7e224ec8..f1b9ca9e617c0816318f8b0fbcfa8fe8a26818a3 100644
--- a/services/shell/public/cpp/lib/interface_registry.cc
+++ b/services/shell/public/cpp/lib/interface_registry.cc
@@ -9,7 +9,7 @@
namespace shell {
InterfaceRegistry::InterfaceRegistry(Connection* connection)
- : binding_(this), connection_(connection) {}
+ : binding_(this), connection_(connection), weak_factory_(this) {}
InterfaceRegistry::~InterfaceRegistry() {}
void InterfaceRegistry::Bind(
@@ -18,6 +18,10 @@ void InterfaceRegistry::Bind(
binding_.Bind(std::move(local_interfaces_request));
}
+base::WeakPtr<InterfaceRegistry> InterfaceRegistry::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
void InterfaceRegistry::RemoveInterface(const std::string& name) {
auto it = name_to_binder_.find(name);
if (it != name_to_binder_.end())

Powered by Google App Engine
This is Rietveld 408576698