I think it is wrong, 'SetObserver' is better to be invoked explicitly by the client code rather, than in such an opaque way. This also will allow Observer class not to hold "extension_" member.