| Index: third_party/WebKit/Source/web/DevToolsEmulator.h
|
| diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.h b/third_party/WebKit/Source/web/DevToolsEmulator.h
|
| index 07836526e34fbc6b10560e8bfe291d7ce2486c8d..2bae88a10b15eb395074164d6ebe2a64e4d95964 100644
|
| --- a/third_party/WebKit/Source/web/DevToolsEmulator.h
|
| +++ b/third_party/WebKit/Source/web/DevToolsEmulator.h
|
| @@ -7,19 +7,24 @@
|
|
|
| #include "platform/heap/Handle.h"
|
| #include "public/platform/PointerProperties.h"
|
| +#include "public/platform/WebFloatRect.h"
|
| #include "public/platform/WebViewportStyle.h"
|
| #include "public/web/WebDeviceEmulationParams.h"
|
| +#include "web/WebExport.h"
|
| #include "wtf/Forward.h"
|
| +#include "wtf/Optional.h"
|
| #include <memory>
|
|
|
| namespace blink {
|
|
|
| class InspectorEmulationAgent;
|
| class IntPoint;
|
| +class TransformationMatrix;
|
| +struct WebFloatRect;
|
| class WebInputEvent;
|
| class WebViewImpl;
|
|
|
| -class DevToolsEmulator final : public GarbageCollectedFinalized<DevToolsEmulator> {
|
| +class WEB_EXPORT DevToolsEmulator final : public GarbageCollectedFinalized<DevToolsEmulator> {
|
| public:
|
| ~DevToolsEmulator();
|
| static DevToolsEmulator* create(WebViewImpl*);
|
| @@ -44,23 +49,40 @@ public:
|
| // Emulation.
|
| void enableDeviceEmulation(const WebDeviceEmulationParams&);
|
| void disableDeviceEmulation();
|
| + void setVisualTransformOverride(const WebFloatRect& area, float scale);
|
| + void clearVisualTransformOverride();
|
| bool resizeIsDeviceSizeChange();
|
| void setTouchEventEmulationEnabled(bool);
|
| bool handleInputEvent(const WebInputEvent&);
|
| void setScriptExecutionDisabled(bool);
|
|
|
| + // Notify the DevToolsEmulator about a scroll or scale change of the main
|
| + // frame. Updates the transform for an visual transform override.
|
| + void mainFrameScrollOrScaleChanged();
|
| +
|
| private:
|
| explicit DevToolsEmulator(WebViewImpl*);
|
|
|
| void enableMobileEmulation();
|
| void disableMobileEmulation();
|
|
|
| + void applyDeviceEmulationTransform(TransformationMatrix*);
|
| + void applyVisualTransformOverride(TransformationMatrix*);
|
| + void updateRootLayerTransform();
|
| +
|
| WebViewImpl* m_webViewImpl;
|
|
|
| bool m_deviceMetricsEnabled;
|
| bool m_emulateMobileEnabled;
|
| WebDeviceEmulationParams m_emulationParams;
|
|
|
| + struct VisualTransformOverride {
|
| + WebFloatRect area;
|
| + double scale;
|
| + bool originalVisualViewportMasking;
|
| + };
|
| + WTF::Optional<VisualTransformOverride> m_visualTransformOverride;
|
| +
|
| bool m_isOverlayScrollbarsEnabled;
|
| bool m_isOrientationEventEnabled;
|
| bool m_isMobileLayoutThemeEnabled;
|
|
|