OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DevToolsEmulator_h | 5 #ifndef DevToolsEmulator_h |
6 #define DevToolsEmulator_h | 6 #define DevToolsEmulator_h |
7 | 7 |
| 8 #include "core/css/PointerProperties.h" |
8 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
9 #include "wtf/Forward.h" | 10 #include "wtf/Forward.h" |
10 #include "wtf/OwnPtr.h" | 11 #include "wtf/OwnPtr.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 class InspectorEmulationAgent; | 15 class InspectorEmulationAgent; |
15 class IntPoint; | 16 class IntPoint; |
16 class WebInputEvent; | 17 class WebInputEvent; |
17 class WebViewImpl; | 18 class WebViewImpl; |
(...skipping 12 matching lines...) Expand all Loading... |
30 // Settings overrides. | 31 // Settings overrides. |
31 void setTextAutosizingEnabled(bool); | 32 void setTextAutosizingEnabled(bool); |
32 void setDeviceScaleAdjustment(float); | 33 void setDeviceScaleAdjustment(float); |
33 void setPreferCompositingToLCDTextEnabled(bool); | 34 void setPreferCompositingToLCDTextEnabled(bool); |
34 void setUseMobileViewportStyle(bool); | 35 void setUseMobileViewportStyle(bool); |
35 void setPluginsEnabled(bool); | 36 void setPluginsEnabled(bool); |
36 void setScriptEnabled(bool); | 37 void setScriptEnabled(bool); |
37 void setDoubleTapToZoomEnabled(bool); | 38 void setDoubleTapToZoomEnabled(bool); |
38 bool doubleTapToZoomEnabled() const; | 39 bool doubleTapToZoomEnabled() const; |
39 void setHidePinchScrollbarsNearMinScale(bool); | 40 void setHidePinchScrollbarsNearMinScale(bool); |
| 41 int availablePointerTypes(); |
| 42 PointerType primaryPointerType(); |
| 43 int availableHoverTypes(); |
| 44 HoverType primaryHoverType(); |
| 45 void setAvailablePointerTypes(int); |
| 46 void setPrimaryPointerType(PointerType); |
| 47 void setAvailableHoverTypes(int); |
| 48 void setPrimaryHoverType(HoverType); |
40 | 49 |
41 // Emulation. | 50 // Emulation. |
42 void enableDeviceEmulation(const WebDeviceEmulationParams&); | 51 void enableDeviceEmulation(const WebDeviceEmulationParams&); |
43 void disableDeviceEmulation(); | 52 void disableDeviceEmulation(); |
44 bool deviceEmulationEnabled() { return m_deviceMetricsEnabled; } | 53 bool deviceEmulationEnabled() { return m_deviceMetricsEnabled; } |
45 void setTouchEventEmulationEnabled(bool); | 54 void setTouchEventEmulationEnabled(bool); |
46 bool handleInputEvent(const WebInputEvent&); | 55 bool handleInputEvent(const WebInputEvent&); |
47 void setScriptExecutionDisabled(bool); | 56 void setScriptExecutionDisabled(bool); |
48 | 57 |
49 private: | 58 private: |
50 explicit DevToolsEmulator(WebViewImpl*); | 59 explicit DevToolsEmulator(WebViewImpl*); |
51 | 60 |
52 void enableMobileEmulation(); | 61 void enableMobileEmulation(); |
53 void disableMobileEmulation(); | 62 void disableMobileEmulation(); |
54 | 63 |
55 WebViewImpl* m_webViewImpl; | 64 WebViewImpl* m_webViewImpl; |
56 RawPtrWillBeMember<InspectorEmulationAgent> m_emulationAgent; | 65 RawPtrWillBeMember<InspectorEmulationAgent> m_emulationAgent; |
57 | 66 |
58 bool m_deviceMetricsEnabled; | 67 bool m_deviceMetricsEnabled; |
59 bool m_emulateMobileEnabled; | 68 bool m_emulateMobileEnabled; |
60 bool m_isOverlayScrollbarsEnabled; | 69 bool m_isOverlayScrollbarsEnabled; |
61 float m_originalDefaultMinimumPageScaleFactor; | 70 float m_originalDefaultMinimumPageScaleFactor; |
62 float m_originalDefaultMaximumPageScaleFactor; | 71 float m_originalDefaultMaximumPageScaleFactor; |
63 bool m_embedderTextAutosizingEnabled; | 72 bool m_embedderTextAutosizingEnabled; |
64 float m_embedderDeviceScaleAdjustment; | 73 float m_embedderDeviceScaleAdjustment; |
65 bool m_embedderPreferCompositingToLCDTextEnabled; | 74 bool m_embedderPreferCompositingToLCDTextEnabled; |
66 bool m_embedderUseMobileViewport; | 75 bool m_embedderUseMobileViewport; |
67 bool m_embedderPluginsEnabled; | 76 bool m_embedderPluginsEnabled; |
| 77 int m_embedderAvailablePointerTypes; |
| 78 PointerType m_embedderPrimaryPointerType; |
| 79 int m_embedderAvailableHoverTypes; |
| 80 HoverType m_embedderPrimaryHoverType; |
68 | 81 |
69 bool m_touchEventEmulationEnabled; | 82 bool m_touchEventEmulationEnabled; |
70 bool m_doubleTapToZoomEnabled; | 83 bool m_doubleTapToZoomEnabled; |
71 bool m_originalTouchEnabled; | 84 bool m_originalTouchEnabled; |
72 bool m_originalDeviceSupportsMouse; | 85 bool m_originalDeviceSupportsMouse; |
73 bool m_originalDeviceSupportsTouch; | 86 bool m_originalDeviceSupportsTouch; |
74 int m_originalMaxTouchPoints; | 87 int m_originalMaxTouchPoints; |
75 OwnPtr<IntPoint> m_lastPinchAnchorCss; | 88 OwnPtr<IntPoint> m_lastPinchAnchorCss; |
76 OwnPtr<IntPoint> m_lastPinchAnchorDip; | 89 OwnPtr<IntPoint> m_lastPinchAnchorDip; |
77 | 90 |
78 bool m_embedderScriptEnabled; | 91 bool m_embedderScriptEnabled; |
79 bool m_scriptExecutionDisabled; | 92 bool m_scriptExecutionDisabled; |
80 bool m_hidePinchScrollbarsNearMinScale; | 93 bool m_hidePinchScrollbarsNearMinScale; |
81 }; | 94 }; |
82 | 95 |
83 } // namespace blink | 96 } // namespace blink |
84 | 97 |
85 #endif | 98 #endif |
OLD | NEW |