Index: Source/core/inspector/InspectorPageAgent.cpp |
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp |
index c44d3e0ec4c9b61ffbc3f69e1e7967bbf5352103..87e9550e4c3079d068623393367fdec48057c52d 100644 |
--- a/Source/core/inspector/InspectorPageAgent.cpp |
+++ b/Source/core/inspector/InspectorPageAgent.cpp |
@@ -96,9 +96,7 @@ static const char pageAgentShowFPSCounter[] = "pageAgentShowFPSCounter"; |
static const char pageAgentContinuousPaintingEnabled[] = "pageAgentContinuousPaintingEnabled"; |
static const char pageAgentShowPaintRects[] = "pageAgentShowPaintRects"; |
static const char pageAgentShowDebugBorders[] = "pageAgentShowDebugBorders"; |
-#if ENABLE(TOUCH_EVENTS) |
static const char touchEventEmulationEnabled[] = "touchEventEmulationEnabled"; |
-#endif |
static const char pageAgentEmulatedMedia[] = "pageAgentEmulatedMedia"; |
} |
@@ -348,9 +346,7 @@ void InspectorPageAgent::clearFrontend() |
{ |
ErrorString error; |
disable(&error); |
-#if ENABLE(TOUCH_EVENTS) |
updateTouchEventEmulationInPage(false); |
-#endif |
m_frontend = 0; |
} |
@@ -377,9 +373,7 @@ void InspectorPageAgent::restore() |
double currentFontScaleFactor = m_state->getDouble(PageAgentState::pageAgentFontScaleFactorOverride); |
bool currentFitWindow = m_state->getBoolean(PageAgentState::pageAgentFitWindow); |
updateViewMetrics(currentWidth, currentHeight, currentFontScaleFactor, currentFitWindow); |
-#if ENABLE(TOUCH_EVENTS) |
updateTouchEventEmulationInPage(m_state->getBoolean(PageAgentState::touchEventEmulationEnabled)); |
-#endif |
} |
} |
@@ -1092,14 +1086,12 @@ void InspectorPageAgent::updateViewMetrics(int width, int height, double fontSca |
InspectorInstrumentation::mediaQueryResultChanged(document); |
} |
-#if ENABLE(TOUCH_EVENTS) |
void InspectorPageAgent::updateTouchEventEmulationInPage(bool enabled) |
{ |
m_state->setBoolean(PageAgentState::touchEventEmulationEnabled, enabled); |
if (mainFrame() && mainFrame()->settings()) |
mainFrame()->settings()->setTouchEventEmulationEnabled(enabled); |
} |
-#endif |
void InspectorPageAgent::setGeolocationOverride(ErrorString* error, const double* latitude, const double* longitude, const double* accuracy) |
{ |
@@ -1173,15 +1165,10 @@ DeviceOrientationData* InspectorPageAgent::overrideDeviceOrientation(DeviceOrien |
void InspectorPageAgent::setTouchEmulationEnabled(ErrorString* error, bool enabled) |
{ |
-#if ENABLE(TOUCH_EVENTS) |
if (m_state->getBoolean(PageAgentState::touchEventEmulationEnabled) == enabled) |
return; |
UNUSED_PARAM(error); |
updateTouchEventEmulationInPage(enabled); |
-#else |
- *error = "Touch events emulation not supported"; |
- UNUSED_PARAM(enabled); |
-#endif |
} |
void InspectorPageAgent::setEmulatedMedia(ErrorString*, const String& media) |