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

Unified Diff: Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 1118963002: Revert of DevTools: remove dependency of most agents on InspectorPageAgent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « Source/core/inspector/InspectorLayerTreeAgent.h ('k') | Source/core/inspector/InspectorPageAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorLayerTreeAgent.cpp
diff --git a/Source/core/inspector/InspectorLayerTreeAgent.cpp b/Source/core/inspector/InspectorLayerTreeAgent.cpp
index 9a154ee625d69cce116cdcb587a4c2985c4ce232..45accb3648ac538f4c7803e190c2c7a53ba8332d 100644
--- a/Source/core/inspector/InspectorLayerTreeAgent.cpp
+++ b/Source/core/inspector/InspectorLayerTreeAgent.cpp
@@ -39,6 +39,7 @@
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
#include "core/inspector/IdentifiersFactory.h"
+#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/InspectorState.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/layout/LayoutPart.h"
@@ -145,9 +146,9 @@
return layerObject;
}
-InspectorLayerTreeAgent::InspectorLayerTreeAgent(LocalFrame* inspectedFrame)
+InspectorLayerTreeAgent::InspectorLayerTreeAgent(InspectorPageAgent* pageAgent)
: InspectorBaseAgent<InspectorLayerTreeAgent, InspectorFrontend::LayerTree>("LayerTree")
- , m_inspectedFrame(inspectedFrame)
+ , m_pageAgent(pageAgent)
{
}
@@ -157,7 +158,7 @@
DEFINE_TRACE(InspectorLayerTreeAgent)
{
- visitor->trace(m_inspectedFrame);
+ visitor->trace(m_pageAgent);
InspectorBaseAgent::trace(visitor);
}
@@ -171,9 +172,11 @@
void InspectorLayerTreeAgent::enable(ErrorString*)
{
m_instrumentingAgents->setInspectorLayerTreeAgent(this);
- Document* document = m_inspectedFrame->document();
- if (document && document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
- layerTreeDidChange();
+ if (LocalFrame* frame = m_pageAgent->inspectedFrame()) {
+ Document* document = frame->document();
+ if (document && document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
+ layerTreeDidChange();
+ }
}
void InspectorLayerTreeAgent::disable(ErrorString*)
@@ -253,14 +256,14 @@
DeprecatedPaintLayerCompositor* InspectorLayerTreeAgent::deprecatedPaintLayerCompositor()
{
- LayoutView* layoutView = m_inspectedFrame->contentRenderer();
+ LayoutView* layoutView = m_pageAgent->inspectedFrame()->contentRenderer();
DeprecatedPaintLayerCompositor* compositor = layoutView ? layoutView->compositor() : nullptr;
return compositor;
}
GraphicsLayer* InspectorLayerTreeAgent::rootGraphicsLayer()
{
- return m_inspectedFrame->host()->pinchViewport().rootGraphicsLayer();
+ return m_pageAgent->frameHost()->pinchViewport().rootGraphicsLayer();
}
static GraphicsLayer* findLayerById(GraphicsLayer* root, int layerId)
« no previous file with comments | « Source/core/inspector/InspectorLayerTreeAgent.h ('k') | Source/core/inspector/InspectorPageAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698