Fix inspectable_web_contents_impl.h

This commit is contained in:
Cheng Zhao 2015-03-08 19:13:17 -07:00
parent 8467fee8d8
commit 99e2dbd6e8
2 changed files with 8 additions and 5 deletions

View file

@ -317,10 +317,11 @@ void InspectableWebContentsImpl::AgentHostClosed(
content::DevToolsAgentHost* agent_host, bool replaced) {
}
void InspectableWebContentsImpl::AboutToNavigateRenderView(
content::RenderViewHost* render_view_host) {
frontend_host_.reset(content::DevToolsFrontendHost::Create(
render_view_host, this));
void InspectableWebContentsImpl::AboutToNavigateRenderFrame(
content::RenderFrameHost* new_host) {
if (new_host->GetParent())
return;
frontend_host_.reset(content::DevToolsFrontendHost::Create(new_host, this));
}
void InspectableWebContentsImpl::DidFinishLoad(content::RenderFrameHost* render_frame_host,
@ -355,6 +356,7 @@ bool InspectableWebContentsImpl::AddMessageToConsole(
bool InspectableWebContentsImpl::ShouldCreateWebContents(
content::WebContents* web_contents,
int route_id,
int main_frame_route_id,
WindowContainerType window_container_type,
const base::string16& frame_name,
const GURL& target_url,

View file

@ -104,7 +104,7 @@ class InspectableWebContentsImpl :
bool replaced) override;
// content::WebContentsObserver:
void AboutToNavigateRenderView(content::RenderViewHost* render_view_host) override;
void AboutToNavigateRenderFrame(content::RenderFrameHost* new_host) override;
void DidFinishLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url) override;
void WebContentsDestroyed() override;
@ -118,6 +118,7 @@ class InspectableWebContentsImpl :
bool ShouldCreateWebContents(
content::WebContents* web_contents,
int route_id,
int main_frame_route_id,
WindowContainerType window_container_type,
const base::string16& frame_name,
const GURL& target_url,