| Index: third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| diff --git a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| index 2d57f057f72a31ba7fc8e9c2938507590d91f77b..d33011a355694539ac90b16b5c9bb7a2c9b3b708 100644
|
| --- a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| +++ b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| @@ -31,7 +31,6 @@ InspectorEmulationAgent::InspectorEmulationAgent(WebLocalFrameImpl* webLocalFram
|
| , m_webLocalFrameImpl(webLocalFrameImpl)
|
| , m_client(client)
|
| {
|
| - webViewImpl()->devToolsEmulator()->setEmulationAgent(this);
|
| }
|
|
|
| InspectorEmulationAgent::~InspectorEmulationAgent()
|
| @@ -61,17 +60,6 @@ void InspectorEmulationAgent::disable(ErrorString*)
|
| setEmulatedMedia(&error, String());
|
| }
|
|
|
| -void InspectorEmulationAgent::discardAgent()
|
| -{
|
| - webViewImpl()->devToolsEmulator()->setEmulationAgent(nullptr);
|
| -}
|
| -
|
| -void InspectorEmulationAgent::didCommitLoadForLocalFrame(LocalFrame* frame)
|
| -{
|
| - if (frame == m_webLocalFrameImpl->frame())
|
| - viewportChanged();
|
| -}
|
| -
|
| void InspectorEmulationAgent::resetPageScaleFactor(ErrorString*)
|
| {
|
| webViewImpl()->resetScaleStateImmediately();
|
| @@ -105,30 +93,6 @@ void InspectorEmulationAgent::setCPUThrottlingRate(ErrorString*, double throttli
|
| m_client->setCPUThrottlingRate(throttlingRate);
|
| }
|
|
|
| -void InspectorEmulationAgent::viewportChanged()
|
| -{
|
| - if (!webViewImpl()->devToolsEmulator()->deviceEmulationEnabled() || !frontend())
|
| - return;
|
| -
|
| - FrameView* view = m_webLocalFrameImpl->frameView();
|
| - if (!view)
|
| - return;
|
| -
|
| - IntSize contentsSize = view->contentsSize();
|
| - FloatPoint scrollOffset;
|
| - scrollOffset = FloatPoint(view->scrollableArea()->visibleContentRectDouble().location());
|
| -
|
| - RefPtr<TypeBuilder::Emulation::Viewport> viewport = TypeBuilder::Emulation::Viewport::create()
|
| - .setScrollX(scrollOffset.x())
|
| - .setScrollY(scrollOffset.y())
|
| - .setContentsWidth(contentsSize.width())
|
| - .setContentsHeight(contentsSize.height())
|
| - .setPageScaleFactor(webViewImpl()->page()->pageScaleFactor())
|
| - .setMinimumPageScaleFactor(webViewImpl()->minimumPageScaleFactor())
|
| - .setMaximumPageScaleFactor(webViewImpl()->maximumPageScaleFactor());
|
| - frontend()->viewportChanged(viewport);
|
| -}
|
| -
|
| DEFINE_TRACE(InspectorEmulationAgent)
|
| {
|
| visitor->trace(m_webLocalFrameImpl);
|
|
|