Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: third_party/WebKit/public/web/WebDeviceEmulationParams.h

Issue 2173783002: Adds visual viewport size override to DevTools Emulation protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/browser_protocol.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Scale of emulated view inside available space, not in fit to view mode. 46 // Scale of emulated view inside available space, not in fit to view mode.
47 float scale; 47 float scale;
48 48
49 // Optional screen orientation type, with WebScreenOrientationUndefined 49 // Optional screen orientation type, with WebScreenOrientationUndefined
50 // value meaning no emulation necessary. 50 // value meaning no emulation necessary.
51 WebScreenOrientationType screenOrientationType; 51 WebScreenOrientationType screenOrientationType;
52 52
53 // Screen orientation angle, used together with screenOrientationType. 53 // Screen orientation angle, used together with screenOrientationType.
54 int screenOrientationAngle; 54 int screenOrientationAngle;
55 55
56 // Emulated visual viewport size. |x == 0| or |y == 0| disables the override
dgozman 2016/07/25 22:13:54 nit: x, y -> width, height
Eric Seckler 2016/07/26 08:33:50 Done.
57 // for the respective coordinate.
58 WebSize visualViewportSize;
59
56 WebDeviceEmulationParams() 60 WebDeviceEmulationParams()
57 : screenPosition(Desktop) 61 : screenPosition(Desktop)
58 , deviceScaleFactor(0) 62 , deviceScaleFactor(0)
59 , fitToView(false) 63 , fitToView(false)
60 , scale(1) 64 , scale(1)
61 , screenOrientationType(WebScreenOrientationUndefined) 65 , screenOrientationType(WebScreenOrientationUndefined)
62 , screenOrientationAngle(0) { } 66 , screenOrientationAngle(0) { }
63 }; 67 };
64 68
65 inline bool operator==(const WebDeviceEmulationParams& a, const WebDeviceEmulati onParams& b) 69 inline bool operator==(const WebDeviceEmulationParams& a, const WebDeviceEmulati onParams& b)
66 { 70 {
67 return a.screenPosition == b.screenPosition && a.screenSize == b.screenSize && a.viewPosition == b.viewPosition && a.deviceScaleFactor == b.deviceScaleFacto r 71 return a.screenPosition == b.screenPosition && a.screenSize == b.screenSize && a.viewPosition == b.viewPosition && a.deviceScaleFactor == b.deviceScaleFacto r
68 && a.viewSize == b.viewSize && a.fitToView == b.fitToView && a.offset == b.offset && a.scale == b.scale 72 && a.viewSize == b.viewSize && a.fitToView == b.fitToView && a.offset == b.offset && a.scale == b.scale
69 && a.screenOrientationType == b.screenOrientationType && a.screenOrienta tionAngle == b.screenOrientationAngle; 73 && a.screenOrientationType == b.screenOrientationType && a.screenOrienta tionAngle == b.screenOrientationAngle
74 && a.visualViewportSize == b.visualViewportSize;
70 } 75 }
71 76
72 inline bool operator!=(const WebDeviceEmulationParams& a, const WebDeviceEmulati onParams& b) 77 inline bool operator!=(const WebDeviceEmulationParams& a, const WebDeviceEmulati onParams& b)
73 { 78 {
74 return !(a == b); 79 return !(a == b);
75 } 80 }
76 81
77 } // namespace blink 82 } // namespace blink
78 83
79 #endif 84 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/browser_protocol.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698