mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-01 09:46:09 +03:00
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
|
// Copyright 2018 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.
|
||
|
|
||
|
module blink.mojom;
|
||
|
|
||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||
|
|
||
|
enum ViewportFit {
|
||
|
// No effect - the whole web page is viewable (default).
|
||
|
kAuto,
|
||
|
|
||
|
// The initial layout viewport and the visual viewport are set to the
|
||
|
// largest rectangle which is inscribed in the display of the device.
|
||
|
kContain,
|
||
|
|
||
|
// The initial layout viewport and the visual viewport are set to the
|
||
|
// circumscribed rectangle of the physical screen of the device.
|
||
|
kCover,
|
||
|
|
||
|
// This has the same behaviour as |kCover| but it identifies that the
|
||
|
// ViewportFit value was forced by the user agent by the media controls.
|
||
|
kCoverForcedByUserAgent,
|
||
|
};
|
||
|
|
||
|
// Used for renderer -> browser calls about display cutout.
|
||
|
interface DisplayCutoutHost {
|
||
|
// Notify the browser that the ViewportFit for the renderer has changed.
|
||
|
NotifyViewportFitChanged(blink.mojom.ViewportFit value);
|
||
|
};
|
||
|
|
||
|
// Contains the four safe areas for the display cutout. These are insets from
|
||
|
// each edge of the display measured in pixels.
|
||
|
// TODO(beccahughes): Replace with gfx::Insets
|
||
|
struct DisplayCutoutSafeArea {
|
||
|
int32 top;
|
||
|
int32 left;
|
||
|
int32 bottom;
|
||
|
int32 right;
|
||
|
};
|
||
|
|
||
|
// Used for browser -> renderer calls about display cutout. This is associated
|
||
|
// with a frame.
|
||
|
interface DisplayCutoutClient {
|
||
|
// Notify the renderer that the safe areas have changed.
|
||
|
SetSafeArea(DisplayCutoutSafeArea safe_area);
|
||
|
};
|