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

Unified Diff: Source/WebCore/inspector/InspectorPageAgent.cpp

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
Index: Source/WebCore/inspector/InspectorPageAgent.cpp
diff --git a/Source/WebCore/inspector/InspectorPageAgent.cpp b/Source/WebCore/inspector/InspectorPageAgent.cpp
index 960afa9ec3b41acb2e72884218bb37dc35a9c932..077bbd9b820b00e2c65b81644c001740d175c7aa 100644
--- a/Source/WebCore/inspector/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/InspectorPageAgent.cpp
@@ -94,9 +94,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";
}
@@ -346,9 +344,7 @@ void InspectorPageAgent::clearFrontend()
{
ErrorString error;
disable(&error);
-#if ENABLE(TOUCH_EVENTS)
updateTouchEventEmulationInPage(false);
-#endif
m_frontend = 0;
}
@@ -375,9 +371,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
}
}
@@ -1087,14 +1081,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)
{
@@ -1168,15 +1160,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)

Powered by Google App Engine
This is Rietveld 408576698