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

Unified Diff: Source/core/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: rebase. 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
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698