Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / app_current_window_internal.idl
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.
4
5 // This is used by the app window API internally to pass through messages to
6 // the shell window.
7 [nodoc] namespace app.currentWindowInternal {
8
9   // TODO(asargent) - We need to add support for referencing types in
10   // other namespaces (crbug.com/158654). For now just duplicate this
11   // dictionary from app.window.
12   dictionary Bounds {
13     long? left;
14     long? top;
15     long? width;
16     long? height;
17   };
18
19   dictionary RegionRect {
20     long left;
21     long top;
22     long width;
23     long height;
24   };
25
26   dictionary Region {
27     RegionRect[]? rects;
28   };
29
30   interface Functions {
31     static void focus();
32     static void fullscreen();
33     static void minimize();
34     static void maximize();
35     static void restore();
36     static void drawAttention();
37     static void clearAttention();
38     static void show(optional boolean focused);
39     static void hide();
40     static void setBounds(Bounds bounds);
41     static void setMinWidth(optional long minWidth);
42     static void setMinHeight(optional long minHeight);
43     static void setMaxWidth(optional long maxWidth);
44     static void setMaxHeight(optional long maxHeight);
45     static void setIcon(DOMString icon_url);
46     static void setBadgeIcon(DOMString icon_url);
47     static void clearBadge();
48     static void setShape(Region region);
49     static void setAlwaysOnTop(boolean always_on_top);
50   };
51
52   interface Events {
53     static void onClosed();
54     static void onBoundsChanged();
55     static void onFullscreened();
56     static void onMinimized();
57     static void onMaximized();
58     static void onRestored();
59   };
60 };