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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.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/WebFrameWidgetImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index c76526eef169c48cd487cb34bc97f9bc881066fe..c85a3996299042d791b4dd4b2275196bc337b637 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -68,8 +68,6 @@
#include "web/CompositorMutatorImpl.h"
#include "web/CompositorWorkerProxyClientImpl.h"
#include "web/ContextMenuAllowedScope.h"
-#include "web/InspectorOverlayAgent.h"
-#include "web/PageOverlay.h"
#include "web/WebDevToolsAgentImpl.h"
#include "web/WebInputEventConversion.h"
#include "web/WebInputMethodControllerImpl.h"
@@ -252,13 +250,8 @@ void WebFrameWidgetImpl::UpdateAllLifecyclePhases() {
if (!local_root_)
return;
- 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 = local_root_->DevToolsAgentImpl())
+ devtools->PaintOverlay();
PageWidgetDelegate::UpdateAllLifecyclePhases(*GetPage(),
*local_root_->GetFrame());
UpdateLayerTreeBackgroundColor();
@@ -364,9 +357,11 @@ WebInputEventResult WebFrameWidgetImpl::HandleInputEvent(
if (!GetPage())
return WebInputEventResult::kNotHandled;
- if (InspectorOverlayAgent* overlay = GetInspectorOverlay()) {
- if (overlay->HandleInputEvent(input_event))
- return WebInputEventResult::kHandledSuppressed;
+ if (local_root_) {
+ if (WebDevToolsAgentImpl* devtools = local_root_->DevToolsAgentImpl()) {
+ if (devtools->HandleInputEvent(input_event))
+ return WebInputEventResult::kHandledSuppressed;
+ }
}
// Report the event to be NOT processed by WebKit, so that the browser can
@@ -1195,14 +1190,6 @@ HitTestResult WebFrameWidgetImpl::HitTestResultForRootFramePos(
return result;
}
-InspectorOverlayAgent* WebFrameWidgetImpl::GetInspectorOverlay() {
- if (!local_root_)
- return nullptr;
- if (WebDevToolsAgentImpl* devtools = local_root_->DevToolsAgentImpl())
- return devtools->OverlayAgent();
- return nullptr;
-}
-
LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameInWidget() const {
LocalFrame* frame = GetPage()->GetFocusController().FocusedFrame();
return (frame && frame->LocalFrameRoot() == local_root_->GetFrame())
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698