chromeos-dbus-bindings: Use per signal handlers

When we use a delegate, we're forced into a situation where:

1) Some object must manage the lifetime of both the delegate and the
   proxy
2) We can continue to receive callbacks on the signal handler until
   we detach the proxy from the Bus

However, there is not a great mechanism to coordinate the lifetime
of the managing object with the required lifetime of the delegate
object.  If we ever reach the destructor of the managing object,
it is too late to try and tear down the proxy and its signal delegate.

BUG=chromium:438728
TEST=unittests and generated code compiles.

Change-Id: Ia6f8080b069f4aa6d1b92b1ca612e3d69eee88a7
Reviewed-on: https://chromium-review.googlesource.com/233009
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
diff --git a/chromeos-dbus-bindings/proxy_generator.h b/chromeos-dbus-bindings/proxy_generator.h
index 7d4549b..f561714 100644
--- a/chromeos-dbus-bindings/proxy_generator.h
+++ b/chromeos-dbus-bindings/proxy_generator.h
@@ -47,9 +47,6 @@
   static void AddDestructor(const std::string& class_name,
                             IndentedText* text);
 
-  // Generates a callback for signal receiver registration completion.
-  static void AddSignalConnectedCallback(IndentedText* text);
-
   // Generates ReleaseObjectProxy() method to release ownership
   // of the object proxy.
   static void AddReleaseObjectProxy(IndentedText* text);
@@ -67,9 +64,9 @@
   // Generates OnPropertyChanged() method.
   static void AddOnPropertyChanged(IndentedText* text);
 
-  // Generates the method signatures for signal receivers.
-  static void AddSignalReceiver(const Interface& interface,
-                                IndentedText* text);
+  // Generates logic permitting users to register handlers for signals.
+  static void AddSignalHandlerRegistration(const Interface& interface,
+                                           IndentedText* text);
 
   // Generates the property set class to contain interface properties.
   static void AddPropertySet(const ServiceConfig& config,