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

Side by Side Diff: Source/web/InspectorClientImpl.cpp

Issue 243233002: [DevTools] Disable touch emulation on devices with touch input. (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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (WebDevToolsAgentImpl* agent = devToolsAgent()) 107 if (WebDevToolsAgentImpl* agent = devToolsAgent())
108 agent->overrideDeviceMetrics(width, height, deviceScaleFactor, emulateVi ewport, fitWindow); 108 agent->overrideDeviceMetrics(width, height, deviceScaleFactor, emulateVi ewport, fitWindow);
109 } 109 }
110 110
111 void InspectorClientImpl::setTouchEventEmulationEnabled(bool enabled) 111 void InspectorClientImpl::setTouchEventEmulationEnabled(bool enabled)
112 { 112 {
113 if (WebDevToolsAgentImpl* agent = devToolsAgent()) 113 if (WebDevToolsAgentImpl* agent = devToolsAgent())
114 agent->setTouchEventEmulationEnabled(enabled); 114 agent->setTouchEventEmulationEnabled(enabled);
115 } 115 }
116 116
117 bool InspectorClientImpl::hasTouchInputs()
118 {
119 if (WebDevToolsAgentImpl* agent = devToolsAgent())
120 return agent->hasTouchInputs();
121 return false;
122 }
123
117 bool InspectorClientImpl::overridesShowPaintRects() 124 bool InspectorClientImpl::overridesShowPaintRects()
118 { 125 {
119 return m_inspectedWebView->isAcceleratedCompositingActive(); 126 return m_inspectedWebView->isAcceleratedCompositingActive();
120 } 127 }
121 128
122 void InspectorClientImpl::setShowPaintRects(bool show) 129 void InspectorClientImpl::setShowPaintRects(bool show)
123 { 130 {
124 m_inspectedWebView->setShowPaintRects(show); 131 m_inspectedWebView->setShowPaintRects(show);
125 } 132 }
126 133
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 if (WebDevToolsAgentImpl* agent = devToolsAgent()) 204 if (WebDevToolsAgentImpl* agent = devToolsAgent())
198 agent->stopGPUEventsRecording(); 205 agent->stopGPUEventsRecording();
199 } 206 }
200 207
201 WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent() 208 WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
202 { 209 {
203 return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent( )); 210 return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent( ));
204 } 211 }
205 212
206 } // namespace blink 213 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698