1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WebDeviceEmulationParams_h
6 #define WebDeviceEmulationParams_h
8 #include "public/platform/WebFloatPoint.h"
9 #include "public/platform/WebRect.h"
10 #include "public/platform/WebSize.h"
14 // All sizes are measured in device independent pixels.
15 struct WebDeviceEmulationParams {
16 // For mobile, screen has the same size as view, which is positioned at (0;0).
17 // For desktop, screen size and view position are preserved.
23 ScreenPosition screenPosition;
25 // If zero, the original device scale factor is preserved.
26 float deviceScaleFactor;
28 // Emulated view size. Empty size means no override.
31 // Whether emulated view should be scaled down if necessary to fit into available space.
34 // Offset of emulated view inside available space, not in fit to view mode.
37 // Scale of emulated view inside available space, not in fit to view mode.
40 WebDeviceEmulationParams()
41 : screenPosition(Desktop)
42 , deviceScaleFactor(0)