OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 WebDeviceEmulationParams_h | 5 #ifndef WebDeviceEmulationParams_h |
6 #define WebDeviceEmulationParams_h | 6 #define WebDeviceEmulationParams_h |
7 | 7 |
8 #include "../platform/WebFloatPoint.h" | 8 #include "../platform/WebFloatPoint.h" |
9 #include "../platform/WebPoint.h" | 9 #include "../platform/WebPoint.h" |
10 #include "../platform/WebRect.h" | 10 #include "../platform/WebRect.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // Position of view on the screen. Used with |screenPosition == Mobile|. | 27 // Position of view on the screen. Used with |screenPosition == Mobile|. |
28 WebPoint viewPosition; | 28 WebPoint viewPosition; |
29 | 29 |
30 // If zero, the original device scale factor is preserved. | 30 // If zero, the original device scale factor is preserved. |
31 float deviceScaleFactor; | 31 float deviceScaleFactor; |
32 | 32 |
33 // Emulated view size. Empty size means no override. | 33 // Emulated view size. Empty size means no override. |
34 WebSize viewSize; | 34 WebSize viewSize; |
35 | 35 |
36 // Whether emulated view should be scaled down if necessary to fit into availa
ble space. | 36 // Whether emulated view should be scaled down if necessary to fit into |
| 37 // available space. |
37 bool fitToView; | 38 bool fitToView; |
38 | 39 |
39 // Offset of emulated view inside available space, not in fit to view mode. | 40 // Offset of emulated view inside available space, not in fit to view mode. |
40 WebFloatPoint offset; | 41 WebFloatPoint offset; |
41 | 42 |
42 // Scale of emulated view inside available space, not in fit to view mode. | 43 // Scale of emulated view inside available space, not in fit to view mode. |
43 float scale; | 44 float scale; |
44 | 45 |
45 // Optional screen orientation type, with WebScreenOrientationUndefined | 46 // Optional screen orientation type, with WebScreenOrientationUndefined |
46 // value meaning no emulation necessary. | 47 // value meaning no emulation necessary. |
(...skipping 23 matching lines...) Expand all Loading... |
70 } | 71 } |
71 | 72 |
72 inline bool operator!=(const WebDeviceEmulationParams& a, | 73 inline bool operator!=(const WebDeviceEmulationParams& a, |
73 const WebDeviceEmulationParams& b) { | 74 const WebDeviceEmulationParams& b) { |
74 return !(a == b); | 75 return !(a == b); |
75 } | 76 } |
76 | 77 |
77 } // namespace blink | 78 } // namespace blink |
78 | 79 |
79 #endif | 80 #endif |
OLD | NEW |