blob: 6092394141da4fdfef4d16556c3e34ce581b5d0f [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/optional.h"
#include "components/viz/common/surfaces/local_surface_id.h"
#include "content/common/content_export.h"
#include "content/public/common/screen_info.h"
#include "third_party/WebKit/public/platform/WebDisplayMode.h"
#include "ui/gfx/geometry/size.h"
namespace content {
struct CONTENT_EXPORT ResizeParams {
ResizeParams(const ResizeParams& other);
// Information about the screen (dpi, depth, etc..).
ScreenInfo screen_info;
// The size of the renderer.
gfx::Size new_size;
// The size of the view's backing surface in non-DPI-adjusted pixels.
gfx::Size physical_backing_size;
// Whether or not Blink's viewport size should be shrunk by the height of the
// URL-bar (always false on platforms where URL-bar hiding isn't supported).
bool browser_controls_shrink_blink_size;
// Whether or not the focused node should be scrolled into view after the
// resize.
bool scroll_focused_node_into_view;
// The height of the top controls (always 0 on platforms where URL-bar hiding
// isn't supported).
float top_controls_height;
// The height of the bottom controls.
float bottom_controls_height;
// The local surface ID to use (if valid).
base::Optional<viz::LocalSurfaceId> local_surface_id;
// The size of the visible viewport, which may be smaller than the view if the
// view is partially occluded (e.g. by a virtual keyboard). The size is in
// DPI-adjusted pixels.
gfx::Size visible_viewport_size;
// Indicates whether tab-initiated fullscreen was granted.
bool is_fullscreen_granted;
// The display mode.
blink::WebDisplayMode display_mode;
// If set, requests the renderer to reply with a
// ViewHostMsg_ResizeOrRepaint_ACK with the
// ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK bit set in flags.
bool needs_resize_ack;
} // namespace content