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

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

Issue 222173002: [DevTools] Introduced WebDeviceEmulationParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 | « public/web/WebDevToolsAgentClient.h ('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
(Empty)
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.
4
5 #ifndef WebDeviceEmulationParams_h
6 #define WebDeviceEmulationParams_h
7
8 #include "public/platform/WebRect.h"
9 #include "public/platform/WebSize.h"
10
11 namespace blink {
12
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.
17 enum ScreenPosition {
18 Desktop,
19 Mobile
20 };
21
22 ScreenPosition screenPosition;
23
24 // If zero, the original device scale factor is preserved.
25 float deviceScaleFactor;
26
27 // Emulated view size. Empty size means no override.
28 WebSize viewSize;
29
30 // Whether emulated view should be scaled down if necessary to fit into avai lable space.
31 bool fitToView;
32
33 // Insets of emulated view inside available view space, in fit to view mode.
34 WebSize viewInsets;
35
36 WebDeviceEmulationParams()
37 : screenPosition(Desktop)
38 , deviceScaleFactor(0)
39 , fitToView(false) { }
40 };
41
42 } // namespace blink
43
44 #endif
OLDNEW
« no previous file with comments | « public/web/WebDevToolsAgentClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698