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

Unified Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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/web/PageWidgetDelegate.cpp ('k') | Source/web/WebDevToolsFrontendImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDevToolsAgentImpl.cpp
diff --git a/Source/web/WebDevToolsAgentImpl.cpp b/Source/web/WebDevToolsAgentImpl.cpp
index 758f632575f848ab9878b63715a24ec3f801db6a..0eb0a92f10ff4febc6ac2ca68deb87017ce4fc9d 100644
--- a/Source/web/WebDevToolsAgentImpl.cpp
+++ b/Source/web/WebDevToolsAgentImpl.cpp
@@ -307,7 +307,7 @@ bool WebDevToolsAgentImpl::handleInputEvent(WebCore::Page* page, const WebInputE
// compositor-side pinch handling is not enabled. See http://crbug.com/138003.
bool isPinch = inputEvent.type == WebInputEvent::GesturePinchBegin || inputEvent.type == WebInputEvent::GesturePinchUpdate || inputEvent.type == WebInputEvent::GesturePinchEnd;
if (isPinch && m_touchEventEmulationEnabled && m_emulateViewportEnabled) {
- FrameView* frameView = page->mainFrame()->view();
+ FrameView* frameView = page->deprecatedLocalMainFrame()->view();
PlatformGestureEventBuilder gestureEvent(frameView, *static_cast<const WebGestureEvent*>(&inputEvent));
float pageScaleFactor = page->pageScaleFactor();
if (gestureEvent.type() == PlatformEvent::GesturePinchBegin) {
@@ -335,21 +335,21 @@ bool WebDevToolsAgentImpl::handleInputEvent(WebCore::Page* page, const WebInputE
if (WebInputEvent::isGestureEventType(inputEvent.type) && inputEvent.type == WebInputEvent::GestureTap) {
// Only let GestureTab in (we only need it and we know PlatformGestureEventBuilder supports it).
- PlatformGestureEvent gestureEvent = PlatformGestureEventBuilder(page->mainFrame()->view(), *static_cast<const WebGestureEvent*>(&inputEvent));
- return ic->handleGestureEvent(page->mainFrame(), gestureEvent);
+ PlatformGestureEvent gestureEvent = PlatformGestureEventBuilder(page->deprecatedLocalMainFrame()->view(), *static_cast<const WebGestureEvent*>(&inputEvent));
+ return ic->handleGestureEvent(toLocalFrame(page->mainFrame()), gestureEvent);
}
if (WebInputEvent::isMouseEventType(inputEvent.type) && inputEvent.type != WebInputEvent::MouseEnter) {
// PlatformMouseEventBuilder does not work with MouseEnter type, so we filter it out manually.
- PlatformMouseEvent mouseEvent = PlatformMouseEventBuilder(page->mainFrame()->view(), *static_cast<const WebMouseEvent*>(&inputEvent));
- return ic->handleMouseEvent(page->mainFrame(), mouseEvent);
+ PlatformMouseEvent mouseEvent = PlatformMouseEventBuilder(page->deprecatedLocalMainFrame()->view(), *static_cast<const WebMouseEvent*>(&inputEvent));
+ return ic->handleMouseEvent(toLocalFrame(page->mainFrame()), mouseEvent);
}
if (WebInputEvent::isTouchEventType(inputEvent.type)) {
- PlatformTouchEvent touchEvent = PlatformTouchEventBuilder(page->mainFrame()->view(), *static_cast<const WebTouchEvent*>(&inputEvent));
- return ic->handleTouchEvent(page->mainFrame(), touchEvent);
+ PlatformTouchEvent touchEvent = PlatformTouchEventBuilder(page->deprecatedLocalMainFrame()->view(), *static_cast<const WebTouchEvent*>(&inputEvent));
+ return ic->handleTouchEvent(toLocalFrame(page->mainFrame()), touchEvent);
}
if (WebInputEvent::isKeyboardEventType(inputEvent.type)) {
PlatformKeyboardEvent keyboardEvent = PlatformKeyboardEventBuilder(*static_cast<const WebKeyboardEvent*>(&inputEvent));
- return ic->handleKeyboardEvent(page->mainFrame(), keyboardEvent);
+ return ic->handleKeyboardEvent(page->deprecatedLocalMainFrame(), keyboardEvent);
}
return false;
}
@@ -617,7 +617,7 @@ InspectorController* WebDevToolsAgentImpl::inspectorController()
LocalFrame* WebDevToolsAgentImpl::mainFrame()
{
if (Page* page = m_webViewImpl->page())
- return page->mainFrame();
+ return page->deprecatedLocalMainFrame();
return 0;
}
« no previous file with comments | « Source/web/PageWidgetDelegate.cpp ('k') | Source/web/WebDevToolsFrontendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698