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

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

Issue 693893002: [DevTools] Add configuration parameter to Page.setTouchEmulationEnabled. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/devtools/front_end/main/Tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 m_page->settings().setDeviceSupportsMouse(enabled ? false : m_originalDe viceSupportsMouse); 1396 m_page->settings().setDeviceSupportsMouse(enabled ? false : m_originalDe viceSupportsMouse);
1397 m_page->settings().setDeviceSupportsTouch(enabled ? true : m_originalDev iceSupportsTouch); 1397 m_page->settings().setDeviceSupportsTouch(enabled ? true : m_originalDev iceSupportsTouch);
1398 // Currently emulation does not provide multiple touch points. 1398 // Currently emulation does not provide multiple touch points.
1399 m_page->settings().setMaxTouchPoints(enabled ? 1 : m_originalMaxTouchPoi nts); 1399 m_page->settings().setMaxTouchPoints(enabled ? 1 : m_originalMaxTouchPoi nts);
1400 } 1400 }
1401 m_touchEmulationEnabled = enabled; 1401 m_touchEmulationEnabled = enabled;
1402 m_client->setTouchEventEmulationEnabled(enabled); 1402 m_client->setTouchEventEmulationEnabled(enabled);
1403 m_page->deprecatedLocalMainFrame()->view()->layout(); 1403 m_page->deprecatedLocalMainFrame()->view()->layout();
1404 } 1404 }
1405 1405
1406 void InspectorPageAgent::setTouchEmulationEnabled(ErrorString*, bool enabled) 1406 void InspectorPageAgent::setTouchEmulationEnabled(ErrorString*, bool enabled, co nst String* configuration)
1407 { 1407 {
1408 if (m_state->getBoolean(PageAgentState::touchEventEmulationEnabled) == enabl ed) 1408 if (m_state->getBoolean(PageAgentState::touchEventEmulationEnabled) == enabl ed)
1409 return; 1409 return;
1410 1410
1411 m_state->setBoolean(PageAgentState::touchEventEmulationEnabled, enabled); 1411 m_state->setBoolean(PageAgentState::touchEventEmulationEnabled, enabled);
1412 updateTouchEventEmulationInPage(enabled); 1412 updateTouchEventEmulationInPage(enabled);
1413 } 1413 }
1414 1414
1415 void InspectorPageAgent::setEmulatedMedia(ErrorString*, const String& media) 1415 void InspectorPageAgent::setEmulatedMedia(ErrorString*, const String& media)
1416 { 1416 {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 void InspectorPageAgent::trace(Visitor* visitor) 1496 void InspectorPageAgent::trace(Visitor* visitor)
1497 { 1497 {
1498 visitor->trace(m_page); 1498 visitor->trace(m_page);
1499 visitor->trace(m_injectedScriptManager); 1499 visitor->trace(m_injectedScriptManager);
1500 visitor->trace(m_inspectorResourceContentLoader); 1500 visitor->trace(m_inspectorResourceContentLoader);
1501 InspectorBaseAgent::trace(visitor); 1501 InspectorBaseAgent::trace(visitor);
1502 } 1502 }
1503 1503
1504 } // namespace blink 1504 } // namespace blink
1505 1505
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/devtools/front_end/main/Tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698