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/WebRect.h"
9 #include "public/platform/WebSize.h"
13 // All sizes are measured in device independent pixels.
14 struct WebDeviceEmulationParams {
15 // For mobile, screen has the same size as view, which is positioned at (0;0).
16 // For desktop, screen size and view position are preserved.
22 ScreenPosition screenPosition;
24 // If zero, the original device scale factor is preserved.
25 float deviceScaleFactor;
27 // Emulated view size. Empty size means no override.
30 // Whether emulated view should be scaled down if necessary to fit into available space.
33 // Insets of emulated view inside available view space, in fit to view mode.
36 WebDeviceEmulationParams()
37 : screenPosition(Desktop)
38 , deviceScaleFactor(0)
39 , fitToView(false) { }