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

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

Issue 892693006: Revert of DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/InspectorInputAgent.h ('k') | Source/core/inspector/InspectorInspectorAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorInputAgent.cpp
diff --git a/Source/core/inspector/InspectorInputAgent.cpp b/Source/core/inspector/InspectorInputAgent.cpp
index df01703bdc93bf4af024d2fdb1438a01999dcdd7..6ec0abcac29471a6efdc0269fe55c1562e17e1cf 100644
--- a/Source/core/inspector/InspectorInputAgent.cpp
+++ b/Source/core/inspector/InspectorInputAgent.cpp
@@ -34,7 +34,6 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/inspector/InspectorClient.h"
-#include "core/inspector/InspectorPageAgent.h"
#include "core/page/Chrome.h"
#include "core/page/EventHandler.h"
#include "core/page/Page.h"
@@ -80,19 +79,19 @@
}
};
-void ConvertInspectorPoint(blink::LocalFrame* frame, const blink::IntPoint& point, blink::IntPoint* convertedPoint, blink::IntPoint* globalPoint)
-{
- *convertedPoint = frame->view()->convertToContainingWindow(point);
- *globalPoint = frame->page()->chrome().rootViewToScreen(blink::IntRect(point, blink::IntSize(0, 0))).location();
+void ConvertInspectorPoint(blink::Page* page, const blink::IntPoint& point, blink::IntPoint* convertedPoint, blink::IntPoint* globalPoint)
+{
+ *convertedPoint = page->deprecatedLocalMainFrame()->view()->convertToContainingWindow(point);
+ *globalPoint = page->chrome().rootViewToScreen(blink::IntRect(point, blink::IntSize(0, 0))).location();
}
} // namespace
namespace blink {
-InspectorInputAgent::InspectorInputAgent(InspectorPageAgent* pageAgent, InspectorClient* client)
+InspectorInputAgent::InspectorInputAgent(Page* page, InspectorClient* client)
: InspectorBaseAgent<InspectorInputAgent>("Input")
- , m_pageAgent(pageAgent), m_client(client)
+ , m_page(page), m_client(client)
{
}
@@ -164,7 +163,7 @@
// Some platforms may have flipped coordinate systems, but the given coordinates
// assume the origin is in the top-left of the window. Convert.
IntPoint convertedPoint, globalPoint;
- ConvertInspectorPoint(m_pageAgent->inspectedFrame(), IntPoint(x, y), &convertedPoint, &globalPoint);
+ ConvertInspectorPoint(m_page, IntPoint(x, y), &convertedPoint, &globalPoint);
PlatformMouseEvent event(
convertedPoint,
@@ -258,18 +257,18 @@
// Some platforms may have flipped coordinate systems, but the given coordinates
// assume the origin is in the top-left of the window. Convert.
IntPoint convertedPoint, globalPoint;
- ConvertInspectorPoint(m_pageAgent->inspectedFrame(), IntPoint(x, y), &convertedPoint, &globalPoint);
+ ConvertInspectorPoint(m_page, IntPoint(x, y), &convertedPoint, &globalPoint);
SyntheticInspectorTouchPoint point(id++, convertedState, globalPoint, convertedPoint, radiusX, radiusY, rotationAngle, force);
event.append(point);
}
- m_pageAgent->inspectedFrame()->eventHandler().handleTouchEvent(event);
+ m_page->deprecatedLocalMainFrame()->eventHandler().handleTouchEvent(event);
}
void InspectorInputAgent::trace(Visitor* visitor)
{
- visitor->trace(m_pageAgent);
+ visitor->trace(m_page);
InspectorBaseAgent::trace(visitor);
}
« no previous file with comments | « Source/core/inspector/InspectorInputAgent.h ('k') | Source/core/inspector/InspectorInspectorAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698