#include "content/browser/frame_host/navigation_entry_screenshot_manager.h"
#include "content/browser/renderer_host/render_view_host_impl.h" // Temporary
#include "content/browser/site_instance_impl.h"
+#include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
if (HandleDebugURL(params.url, params.transition_type))
return;
+ // Any renderer-side debug URLs or javascript: URLs should be ignored if the
+ // renderer process is not live, unless it is the initial navigation of the
+ // tab.
+ if (IsRendererDebugURL(params.url)) {
+ // TODO(creis): Find the RVH for the correct frame.
+ if (!delegate_->GetRenderViewHost()->IsRenderViewLive() &&
+ !IsInitialNavigation())
+ return;
+ }
+
// Checks based on params.load_type.
switch (params.load_type) {
case LOAD_TYPE_DEFAULT:
bool NavigationControllerImpl::RendererDidNavigate(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params,
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
LoadCommittedDetails* details) {
is_initial_navigation_ = false;
NavigationType NavigationControllerImpl::ClassifyNavigation(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params) const {
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const {
if (params.page_id == -1) {
// The renderer generates the page IDs, and so if it gives us the invalid
// page ID (-1) we know it didn't actually navigate. This happens in a few
void NavigationControllerImpl::RendererDidNavigateToNewPage(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params,
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
bool replace_entry) {
NavigationEntryImpl* new_entry;
bool update_virtual_url;
void NavigationControllerImpl::RendererDidNavigateToExistingPage(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params) {
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
// We should only get here for main frame navigations.
DCHECK(PageTransitionIsMainFrame(params.transition));
void NavigationControllerImpl::RendererDidNavigateToSamePage(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params) {
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
// This mode implies we have a pending entry that's the same as an existing
// entry for this page ID. This entry is guaranteed to exist by
// ClassifyNavigation. All we need to do is update the existing entry.
void NavigationControllerImpl::RendererDidNavigateInPage(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params,
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
bool* did_replace_entry) {
DCHECK(PageTransitionIsMainFrame(params.transition)) <<
"WebKit should only tell us about in-page navs for the main frame.";
void NavigationControllerImpl::RendererDidNavigateNewSubframe(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params) {
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
if (PageTransitionCoreTypeIs(params.transition,
PAGE_TRANSITION_AUTO_SUBFRAME)) {
// This is not user-initiated. Ignore.
bool NavigationControllerImpl::RendererDidNavigateAutoSubframe(
RenderViewHost* rvh,
- const ViewHostMsg_FrameNavigate_Params& params) {
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
// We're guaranteed to have a previously committed entry, and we now need to
// handle navigation inside of a subframe in it without creating a new entry.
DCHECK(GetLastCommittedEntry());