Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / extensions / common / api / app_current_window_internal.idl
blobf6bd26ff3315650684ae672a7c3775176339eb5b
1 // Copyright (c) 2012 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.
5 // This is used by the app window API internally to pass through messages to
6 // the shell window.
7 [nodoc] namespace app.currentWindowInternal {
9 // Null or undefined indicates that a value should not change.
10 dictionary Bounds {
11 long? left;
12 long? top;
13 long? width;
14 long? height;
17 // Null or undefined indicates that a value should not change. A value of 0
18 // will clear the constraints.
19 dictionary SizeConstraints {
20 long? minWidth;
21 long? minHeight;
22 long? maxWidth;
23 long? maxHeight;
26 dictionary RegionRect {
27 long left;
28 long top;
29 long width;
30 long height;
33 dictionary Region {
34 RegionRect[]? rects;
37 interface Functions {
38 static void focus();
39 static void fullscreen();
40 static void minimize();
41 static void maximize();
42 static void restore();
43 static void drawAttention();
44 static void clearAttention();
45 static void show(optional boolean focused);
46 static void hide();
47 static void setBounds(DOMString boundsType, Bounds bounds);
48 static void setSizeConstraints(DOMString boundsType,
49 SizeConstraints constraints);
50 static void setIcon(DOMString icon_url);
51 static void setBadgeIcon(DOMString icon_url);
52 static void clearBadge();
53 static void setShape(Region region);
54 static void setAlwaysOnTop(boolean always_on_top);
55 static void setVisibleOnAllWorkspaces(boolean always_visible);
58 interface Events {
59 static void onClosed();
60 static void onBoundsChanged();
61 static void onFullscreened();
62 static void onMinimized();
63 static void onMaximized();
64 static void onRestored();
65 static void onAlphaEnabledChanged();
66 // Only sent in tests.
67 static void onWindowShownForTests();