#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
-#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
// them. Once they have fired, we'll get a message back saying whether
// to proceed closing the page or not, which sends us back to this method
// with the NeedToFireBeforeUnload bit cleared.
- contents->GetMainFrame()->DispatchBeforeUnload(false);
+ contents->DispatchBeforeUnload(false);
return true;
}
return false;
// and then call beforeunload handlers for |web_contents|.
// See DevToolsWindow::InterceptPageBeforeUnload for details.
if (!DevToolsWindow::InterceptPageBeforeUnload(web_contents))
- web_contents->GetMainFrame()->DispatchBeforeUnload(false);
+ web_contents->DispatchBeforeUnload(false);
} else {
ClearUnloadState(web_contents, true);
}