Well I can't find anything in the CSA Regulations regarding this. I've been told to that the Chief Engineer takes over if the Master is incapacitated or dies. But this would only be in a limited as a Management Role. The Chief Engineer cannot stand an Navigational Watch or manoeuvre the vessel, nor dose the Ch. Eng. has even completed any of the Offical Log book entries this is where the Ch. Mate comes up and assumes command of the Bridge. Of course the Ch Mate and Ch Eng would/should have a discussion as the Ch Eng has a lot more experience in most cases then the Ch Mate.
Just my two cents..