WebContentsFocused is removed.

Use OnWebContentsFocused instead.
This commit is contained in:
Haojian Wu 2015-07-23 15:00:14 +08:00 committed by Cheng Zhao
parent ce6172b829
commit c5ae2926e1
2 changed files with 3 additions and 5 deletions

View file

@ -21,7 +21,6 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/values.h" #include "base/values.h"
#include "content/public/browser/browser_thread.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/host_zoom_map.h"
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h" #include "content/public/browser/render_view_host.h"
@ -364,7 +363,7 @@ void InspectableWebContentsImpl::LoadNetworkResource(
auto browser_context = static_cast<BrowserContext*>(devtools_web_contents_->GetBrowserContext()); auto browser_context = static_cast<BrowserContext*>(devtools_web_contents_->GetBrowserContext());
net::URLFetcher* fetcher = net::URLFetcher* fetcher =
net::URLFetcher::Create(gurl, net::URLFetcher::GET, this); (net::URLFetcher::Create(gurl, net::URLFetcher::GET, this)).release();
pending_requests_[fetcher] = callback; pending_requests_[fetcher] = callback;
fetcher->SetRequestContext(browser_context->url_request_context_getter()); fetcher->SetRequestContext(browser_context->url_request_context_getter());
fetcher->SetExtraRequestHeaders(headers); fetcher->SetExtraRequestHeaders(headers);
@ -577,8 +576,7 @@ void InspectableWebContentsImpl::CloseContents(content::WebContents* source) {
CloseDevTools(); CloseDevTools();
} }
void InspectableWebContentsImpl::WebContentsFocused( void InspectableWebContentsImpl::OnWebContentsFocused() {
content::WebContents* contents) {
if (view_->GetDelegate()) if (view_->GetDelegate())
view_->GetDelegate()->DevToolsFocused(); view_->GetDelegate()->DevToolsFocused();
} }

View file

@ -125,6 +125,7 @@ class InspectableWebContentsImpl :
void AboutToNavigateRenderFrame(content::RenderFrameHost* old_host, void AboutToNavigateRenderFrame(content::RenderFrameHost* old_host,
content::RenderFrameHost* new_host) override; content::RenderFrameHost* new_host) override;
void WebContentsDestroyed() override; void WebContentsDestroyed() override;
void OnWebContentsFocused() override;
// content::WebContentsDelegate: // content::WebContentsDelegate:
bool AddMessageToConsole(content::WebContents* source, bool AddMessageToConsole(content::WebContents* source,
@ -144,7 +145,6 @@ class InspectableWebContentsImpl :
void HandleKeyboardEvent( void HandleKeyboardEvent(
content::WebContents*, const content::NativeWebKeyboardEvent&) override; content::WebContents*, const content::NativeWebKeyboardEvent&) override;
void CloseContents(content::WebContents* source) override; void CloseContents(content::WebContents* source) override;
void WebContentsFocused(content::WebContents* contents) override;
// net::URLFetcherDelegate: // net::URLFetcherDelegate:
void OnURLFetchComplete(const net::URLFetcher* source) override; void OnURLFetchComplete(const net::URLFetcher* source) override;