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

Side by Side Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 145003002: [DevTools] Switch from blink-based to content-based touch emulation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 } 1153 }
1154 1154
1155 // FIXME: allow metrics override, fps counter and continuous painting at the same time: crbug.com/299837. 1155 // FIXME: allow metrics override, fps counter and continuous painting at the same time: crbug.com/299837.
1156 m_client->setShowFPSCounter(m_state->getBoolean(PageAgentState::pageAgentSho wFPSCounter) && !m_deviceMetricsOverridden); 1156 m_client->setShowFPSCounter(m_state->getBoolean(PageAgentState::pageAgentSho wFPSCounter) && !m_deviceMetricsOverridden);
1157 m_client->setContinuousPaintingEnabled(m_state->getBoolean(PageAgentState::p ageAgentContinuousPaintingEnabled) && !m_deviceMetricsOverridden); 1157 m_client->setContinuousPaintingEnabled(m_state->getBoolean(PageAgentState::p ageAgentContinuousPaintingEnabled) && !m_deviceMetricsOverridden);
1158 } 1158 }
1159 1159
1160 void InspectorPageAgent::updateTouchEventEmulationInPage(bool enabled) 1160 void InspectorPageAgent::updateTouchEventEmulationInPage(bool enabled)
1161 { 1161 {
1162 m_state->setBoolean(PageAgentState::touchEventEmulationEnabled, enabled); 1162 m_state->setBoolean(PageAgentState::touchEventEmulationEnabled, enabled);
1163 if (mainFrame() && mainFrame()->settings()) 1163 m_client->setTouchEventEmulationEnabled(enabled);
1164 mainFrame()->settings()->setTouchEventEmulationEnabled(enabled);
1165 } 1164 }
1166 1165
1167 void InspectorPageAgent::setTouchEmulationEnabled(ErrorString*, bool enabled) 1166 void InspectorPageAgent::setTouchEmulationEnabled(ErrorString*, bool enabled)
1168 { 1167 {
1169 if (m_state->getBoolean(PageAgentState::touchEventEmulationEnabled) == enabl ed) 1168 if (m_state->getBoolean(PageAgentState::touchEventEmulationEnabled) == enabl ed)
1170 return; 1169 return;
1171 updateTouchEventEmulationInPage(enabled); 1170 updateTouchEventEmulationInPage(enabled);
1172 } 1171 }
1173 1172
1174 void InspectorPageAgent::setEmulatedMedia(ErrorString*, const String& media) 1173 void InspectorPageAgent::setEmulatedMedia(ErrorString*, const String& media)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 } 1225 }
1227 1226
1228 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) 1227 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid)
1229 { 1228 {
1230 m_state->setBoolean(PageAgentState::showSizeOnResize, show); 1229 m_state->setBoolean(PageAgentState::showSizeOnResize, show);
1231 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; 1230 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ;
1232 } 1231 }
1233 1232
1234 } // namespace WebCore 1233 } // namespace WebCore
1235 1234
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698