Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
index 5ef14d05190b922becf27266fd8bed5ea65fc0c8..2364b0bec77e4b91f47242ee6beaade237f54d33 100644 |
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
@@ -161,7 +161,6 @@ |
#include "web/DedicatedWorkerMessagingProxyProviderImpl.h" |
#include "web/DevToolsEmulator.h" |
#include "web/FullscreenController.h" |
-#include "web/InspectorOverlayAgent.h" |
#include "web/LinkHighlightImpl.h" |
#include "web/PageOverlay.h" |
#include "web/PrerendererClientImpl.h" |
@@ -435,12 +434,6 @@ WebDevToolsAgentImpl* WebViewImpl::MainFrameDevToolsAgentImpl() { |
return main_frame ? main_frame->DevToolsAgentImpl() : nullptr; |
} |
-InspectorOverlayAgent* WebViewImpl::GetInspectorOverlay() { |
- if (WebDevToolsAgentImpl* devtools = MainFrameDevToolsAgentImpl()) |
- return devtools->OverlayAgent(); |
- return nullptr; |
-} |
- |
WebLocalFrameImpl* WebViewImpl::MainFrameImpl() const { |
return page_ && page_->MainFrame() && page_->MainFrame()->IsLocalFrame() |
? WebLocalFrameImpl::FromFrame(page_->DeprecatedLocalMainFrame()) |
@@ -2038,13 +2031,8 @@ void WebViewImpl::UpdateAllLifecyclePhases() { |
PageWidgetDelegate::UpdateAllLifecyclePhases(*page_, |
*MainFrameImpl()->GetFrame()); |
- if (InspectorOverlayAgent* overlay = GetInspectorOverlay()) { |
- overlay->UpdateAllLifecyclePhases(); |
- // TODO(chrishtr): integrate paint into the overlay's lifecycle. |
- if (overlay->GetPageOverlay() && |
- overlay->GetPageOverlay()->GetGraphicsLayer()) |
- overlay->GetPageOverlay()->GetGraphicsLayer()->Paint(nullptr); |
- } |
+ if (WebDevToolsAgentImpl* devtools = MainFrameDevToolsAgentImpl()) |
+ devtools->PaintOverlay(); |
if (page_color_overlay_) |
page_color_overlay_->GetGraphicsLayer()->Paint(nullptr); |
@@ -2181,8 +2169,8 @@ WebInputEventResult WebViewImpl::HandleInputEvent( |
if (dev_tools_emulator_->HandleInputEvent(input_event)) |
return WebInputEventResult::kHandledSuppressed; |
- if (InspectorOverlayAgent* overlay = GetInspectorOverlay()) { |
- if (overlay->HandleInputEvent(input_event)) |
+ if (WebDevToolsAgentImpl* devtools = MainFrameDevToolsAgentImpl()) { |
+ if (devtools->HandleInputEvent(input_event)) |
return WebInputEventResult::kHandledSuppressed; |
} |
@@ -4160,11 +4148,8 @@ AnimationWorkletProxyClient* WebViewImpl::CreateAnimationWorkletProxyClient() { |
void WebViewImpl::UpdatePageOverlays() { |
if (page_color_overlay_) |
page_color_overlay_->Update(); |
- if (InspectorOverlayAgent* overlay = GetInspectorOverlay()) { |
- PageOverlay* inspector_page_overlay = overlay->GetPageOverlay(); |
- if (inspector_page_overlay) |
- inspector_page_overlay->Update(); |
- } |
+ if (WebDevToolsAgentImpl* devtools = MainFrameDevToolsAgentImpl()) |
+ devtools->LayoutOverlay(); |
} |
float WebViewImpl::DeviceScaleFactor() const { |