diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index c3df837943e9..80b142c4ad61 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -21,7 +21,6 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/devtools_http_handler.h" #include "content/public/browser/host_zoom_map.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_view_host.h" @@ -364,7 +363,7 @@ void InspectableWebContentsImpl::LoadNetworkResource( auto browser_context = static_cast(devtools_web_contents_->GetBrowserContext()); net::URLFetcher* fetcher = - net::URLFetcher::Create(gurl, net::URLFetcher::GET, this); + (net::URLFetcher::Create(gurl, net::URLFetcher::GET, this)).release(); pending_requests_[fetcher] = callback; fetcher->SetRequestContext(browser_context->url_request_context_getter()); fetcher->SetExtraRequestHeaders(headers); @@ -577,8 +576,7 @@ void InspectableWebContentsImpl::CloseContents(content::WebContents* source) { CloseDevTools(); } -void InspectableWebContentsImpl::WebContentsFocused( - content::WebContents* contents) { +void InspectableWebContentsImpl::OnWebContentsFocused() { if (view_->GetDelegate()) view_->GetDelegate()->DevToolsFocused(); } diff --git a/brightray/browser/inspectable_web_contents_impl.h b/brightray/browser/inspectable_web_contents_impl.h index 2b3ce59ff9d1..0c185df79ea4 100644 --- a/brightray/browser/inspectable_web_contents_impl.h +++ b/brightray/browser/inspectable_web_contents_impl.h @@ -125,6 +125,7 @@ class InspectableWebContentsImpl : void AboutToNavigateRenderFrame(content::RenderFrameHost* old_host, content::RenderFrameHost* new_host) override; void WebContentsDestroyed() override; + void OnWebContentsFocused() override; // content::WebContentsDelegate: bool AddMessageToConsole(content::WebContents* source, @@ -144,7 +145,6 @@ class InspectableWebContentsImpl : void HandleKeyboardEvent( content::WebContents*, const content::NativeWebKeyboardEvent&) override; void CloseContents(content::WebContents* source) override; - void WebContentsFocused(content::WebContents* contents) override; // net::URLFetcherDelegate: void OnURLFetchComplete(const net::URLFetcher* source) override;