| 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 "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 #include "public/platform/PointerProperties.h" | 9 #include "public/platform/PointerProperties.h" |
| 10 #include "public/web/WebDeviceEmulationParams.h" | 10 #include "public/web/WebDeviceEmulationParams.h" |
| 11 #include "wtf/Forward.h" | 11 #include "wtf/Forward.h" |
| 12 #include "wtf/OwnPtr.h" | 12 #include "wtf/OwnPtr.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class InspectorEmulationAgent; | 16 class InspectorEmulationAgent; |
| 17 class IntPoint; | 17 class IntPoint; |
| 18 class WebInputEvent; | 18 class WebInputEvent; |
| 19 class WebViewImpl; | 19 class WebViewImpl; |
| 20 | 20 |
| 21 class DevToolsEmulator final : public NoBaseWillBeGarbageCollectedFinalized<DevT
oolsEmulator> { | 21 class DevToolsEmulator final : public NoBaseWillBeGarbageCollectedFinalized<DevT
oolsEmulator> { |
| 22 public: | 22 public: |
| 23 ~DevToolsEmulator(); | 23 ~DevToolsEmulator(); |
| 24 static PassOwnPtrWillBeRawPtr<DevToolsEmulator> create(WebViewImpl*); | 24 static PassOwnPtrWillBeRawPtr<DevToolsEmulator> create(WebViewImpl*); |
| 25 DECLARE_TRACE(); | 25 DECLARE_TRACE(); |
| 26 | 26 |
| 27 void setEmulationAgent(InspectorEmulationAgent*); | |
| 28 void viewportChanged(); | |
| 29 | |
| 30 // Settings overrides. | 27 // Settings overrides. |
| 31 void setTextAutosizingEnabled(bool); | 28 void setTextAutosizingEnabled(bool); |
| 32 void setDeviceScaleAdjustment(float); | 29 void setDeviceScaleAdjustment(float); |
| 33 void setPreferCompositingToLCDTextEnabled(bool); | 30 void setPreferCompositingToLCDTextEnabled(bool); |
| 34 void setUseMobileViewportStyle(bool); | 31 void setUseMobileViewportStyle(bool); |
| 35 void setPluginsEnabled(bool); | 32 void setPluginsEnabled(bool); |
| 36 void setScriptEnabled(bool); | 33 void setScriptEnabled(bool); |
| 37 void setDoubleTapToZoomEnabled(bool); | 34 void setDoubleTapToZoomEnabled(bool); |
| 38 bool doubleTapToZoomEnabled() const; | 35 bool doubleTapToZoomEnabled() const; |
| 39 void setAvailablePointerTypes(int); | 36 void setAvailablePointerTypes(int); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 52 bool handleInputEvent(const WebInputEvent&); | 49 bool handleInputEvent(const WebInputEvent&); |
| 53 void setScriptExecutionDisabled(bool); | 50 void setScriptExecutionDisabled(bool); |
| 54 | 51 |
| 55 private: | 52 private: |
| 56 explicit DevToolsEmulator(WebViewImpl*); | 53 explicit DevToolsEmulator(WebViewImpl*); |
| 57 | 54 |
| 58 void enableMobileEmulation(); | 55 void enableMobileEmulation(); |
| 59 void disableMobileEmulation(); | 56 void disableMobileEmulation(); |
| 60 | 57 |
| 61 WebViewImpl* m_webViewImpl; | 58 WebViewImpl* m_webViewImpl; |
| 62 RawPtrWillBeMember<InspectorEmulationAgent> m_emulationAgent; | |
| 63 | 59 |
| 64 bool m_deviceMetricsEnabled; | 60 bool m_deviceMetricsEnabled; |
| 65 bool m_emulateMobileEnabled; | 61 bool m_emulateMobileEnabled; |
| 66 WebDeviceEmulationParams m_emulationParams; | 62 WebDeviceEmulationParams m_emulationParams; |
| 67 | 63 |
| 68 bool m_isOverlayScrollbarsEnabled; | 64 bool m_isOverlayScrollbarsEnabled; |
| 69 float m_originalDefaultMinimumPageScaleFactor; | 65 float m_originalDefaultMinimumPageScaleFactor; |
| 70 float m_originalDefaultMaximumPageScaleFactor; | 66 float m_originalDefaultMaximumPageScaleFactor; |
| 71 bool m_embedderTextAutosizingEnabled; | 67 bool m_embedderTextAutosizingEnabled; |
| 72 float m_embedderDeviceScaleAdjustment; | 68 float m_embedderDeviceScaleAdjustment; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 88 OwnPtr<IntPoint> m_lastPinchAnchorCss; | 84 OwnPtr<IntPoint> m_lastPinchAnchorCss; |
| 89 OwnPtr<IntPoint> m_lastPinchAnchorDip; | 85 OwnPtr<IntPoint> m_lastPinchAnchorDip; |
| 90 | 86 |
| 91 bool m_embedderScriptEnabled; | 87 bool m_embedderScriptEnabled; |
| 92 bool m_scriptExecutionDisabled; | 88 bool m_scriptExecutionDisabled; |
| 93 }; | 89 }; |
| 94 | 90 |
| 95 } // namespace blink | 91 } // namespace blink |
| 96 | 92 |
| 97 #endif | 93 #endif |
| OLD | NEW |