blob: f9eb07c247df8f7ad499644a83864081efeb6ad6 [file] [log] [blame]
fsamuel664e8b62016-01-20 19:54:011// Copyright 2015 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 CONTENT_COMMON_RESIZE_PARAMS_H_
6#define CONTENT_COMMON_RESIZE_PARAMS_H_
7
8#include "content/common/content_export.h"
9#include "third_party/WebKit/public/platform/WebDisplayMode.h"
10#include "third_party/WebKit/public/platform/WebScreenInfo.h"
11#include "ui/gfx/geometry/size.h"
12
13namespace content {
14
15struct CONTENT_EXPORT ResizeParams {
16 ResizeParams();
vmpstr33895d992016-02-24 20:55:2117 ResizeParams(const ResizeParams& other);
fsamuel664e8b62016-01-20 19:54:0118 ~ResizeParams();
19
20 // Information about the screen (dpi, depth, etc..).
21 blink::WebScreenInfo screen_info;
22
23 // The size of the renderer.
24 gfx::Size new_size;
25
26 // The size of the view's backing surface in non-DPI-adjusted pixels.
27 gfx::Size physical_backing_size;
28
29 // Whether or not Blink's viewport size should be shrunk by the height of the
30 // URL-bar (always false on platforms where URL-bar hiding isn't supported).
31 bool top_controls_shrink_blink_size;
32
33 // The height of the top controls (always 0 on platforms where URL-bar hiding
34 // isn't supported).
35 float top_controls_height;
36
37 // The size of the visible viewport, which may be smaller than the view if the
38 // view is partially occluded (e.g. by a virtual keyboard). The size is in
39 // DPI-adjusted pixels.
40 gfx::Size visible_viewport_size;
41
42 // The resizer rect.
43 gfx::Rect resizer_rect;
44
45 // Indicates whether tab-initiated fullscreen was granted.
46 bool is_fullscreen_granted;
47
48 // The display mode.
49 blink::WebDisplayMode display_mode;
50
51 // If set, requests the renderer to reply with a ViewHostMsg_UpdateRect
52 // with the ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK bit set in flags.
53 bool needs_resize_ack;
54};
55
56} // namespace content
57
58#endif // CONTENT_COMMON_RESIZE_PARAMS_H_