Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1117)

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2859273002: [DevTools] Do not talk to inspector overlay from outside (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698