You are getting the CefDOMDocument via a call to CefFrame::VisitDOM(), so keep a reference to the CefFrame in your CefDOMVisitor implementation.
The easiest way to get the complete HTML is via CefFrame::GetSource(). CefDOMDocument::GetDocument()->GetAsMarkup() may also be the complete HTML (I have not tested this).