Currently, developers use arc::InstanceHolder<T>::GetInstanceForMethod() defined in components/arc/instance_holder.h for getting a mojo instance like arc::mojom::AppInstance*. The call is usually like this:
components/arc/net/arc_net_host_impl.cc: auto* net_instance = arc_bridge_service()->net()->GetInstanceForMethod(
components/arc/net/arc_net_host_impl.cc- "ScanCompleted", kScanCompletedMinInstanceVersion);
but there are two small issues here: 1) the first argument (string) is only for logging, and 2) developers have to specify the version manually (which is error-prone.) It'd be nice if the interface looks like something like:
auto* net_instance = arc_bridge_service()->net()->GetInstanceForMethod(&mojom::NetInstance::ScanCompleted);
Comment 1 by lhchavez@chromium.org
, Sep 23 2016