summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/app_current_window_internal.idl
blob: 1808c89371181550f2264e9cc3760eabfff6218f (plain)
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
// Copyright (c) 2012 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.

// This is used by the app window API internally to pass through messages to
// the shell window.
[nodoc] namespace app.currentWindowInternal {

  // TODO(asargent) - We need to add support for referencing types in
  // other namespaces (crbug.com/158654). For now just duplicate this
  // dictionary from app.window.
  dictionary Bounds {
    long? left;
    long? top;
    long? width;
    long? height;
  };

  dictionary RegionRect {
    long left;
    long top;
    long width;
    long height;
  };

  dictionary Region {
    RegionRect[]? rects;
  };

  interface Functions {
    static void focus();
    static void fullscreen();
    static void minimize();
    static void maximize();
    static void restore();
    static void drawAttention();
    static void clearAttention();
    static void show();
    static void hide();
    static void setBounds(Bounds bounds);
    static void setMinWidth(optional long minWidth);
    static void setMinHeight(optional long minHeight);
    static void setMaxWidth(optional long maxWidth);
    static void setMaxHeight(optional long maxHeight);
    static void setIcon(DOMString icon_url);
    static void setShape(Region region);
    static void setAlwaysOnTop(boolean always_on_top);
  };

  interface Events {
    static void onClosed();
    static void onBoundsChanged();
    static void onFullscreened();
    static void onMinimized();
    static void onMaximized();
    static void onRestored();
  };
};