1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Null or undefined indicates that a value should not change.
dictionary Bounds {
long left;
long top;
long width;
long height;
};
// Null or undefined indicates that a value should not change. A value of 0
// will clear the constraints.
dictionary SizeConstraints {
long minWidth;
long minHeight;
long maxWidth;
long maxHeight;
};
dictionary RegionRect {
required long left;
required long top;
required long width;
required long height;
};
dictionary Region {
sequence<RegionRect> rects;
};
callback OnClosedListener = undefined();
interface OnClosedEvent : ExtensionEvent {
static undefined addListener(OnClosedListener listener);
static undefined removeListener(OnClosedListener listener);
static boolean hasListener(OnClosedListener listener);
};
callback OnBoundsChangedListener = undefined();
interface OnBoundsChangedEvent : ExtensionEvent {
static undefined addListener(OnBoundsChangedListener listener);
static undefined removeListener(OnBoundsChangedListener listener);
static boolean hasListener(OnBoundsChangedListener listener);
};
callback OnFullscreenedListener = undefined();
interface OnFullscreenedEvent : ExtensionEvent {
static undefined addListener(OnFullscreenedListener listener);
static undefined removeListener(OnFullscreenedListener listener);
static boolean hasListener(OnFullscreenedListener listener);
};
callback OnMinimizedListener = undefined();
interface OnMinimizedEvent : ExtensionEvent {
static undefined addListener(OnMinimizedListener listener);
static undefined removeListener(OnMinimizedListener listener);
static boolean hasListener(OnMinimizedListener listener);
};
callback OnMaximizedListener = undefined();
interface OnMaximizedEvent : ExtensionEvent {
static undefined addListener(OnMaximizedListener listener);
static undefined removeListener(OnMaximizedListener listener);
static boolean hasListener(OnMaximizedListener listener);
};
callback OnRestoredListener = undefined();
interface OnRestoredEvent : ExtensionEvent {
static undefined addListener(OnRestoredListener listener);
static undefined removeListener(OnRestoredListener listener);
static boolean hasListener(OnRestoredListener listener);
};
callback OnAlphaEnabledChangedListener = undefined();
interface OnAlphaEnabledChangedEvent : ExtensionEvent {
static undefined addListener(OnAlphaEnabledChangedListener listener);
static undefined removeListener(OnAlphaEnabledChangedListener listener);
static boolean hasListener(OnAlphaEnabledChangedListener listener);
};
// This is used by the app window API internally to pass through messages to
// the shell window.
interface CurrentWindowInternal {
static undefined focus();
static undefined fullscreen();
static undefined minimize();
static undefined maximize();
static undefined restore();
static undefined drawAttention();
static undefined clearAttention();
static undefined show(optional boolean focused);
static undefined hide();
static undefined setBounds(DOMString boundsType, Bounds bounds);
static undefined setSizeConstraints(DOMString boundsType,
SizeConstraints constraints);
static undefined setIcon(DOMString icon_url);
static undefined setShape(Region region);
static undefined setAlwaysOnTop(boolean always_on_top);
static undefined setVisibleOnAllWorkspaces(boolean always_visible);
static undefined setActivateOnPointer(boolean activate_on_pointer);
static attribute OnClosedEvent onClosed;
static attribute OnBoundsChangedEvent onBoundsChanged;
static attribute OnFullscreenedEvent onFullscreened;
static attribute OnMinimizedEvent onMinimized;
static attribute OnMaximizedEvent onMaximized;
static attribute OnRestoredEvent onRestored;
static attribute OnAlphaEnabledChangedEvent onAlphaEnabledChanged;
};
partial interface App {
static attribute CurrentWindowInternal currentWindowInternal;
};
partial interface Browser {
static attribute App app;
};
|