Chromium Code Reviews| Index: chrome/common/extensions/api/experimental_wm.idl |
| diff --git a/chrome/common/extensions/api/experimental_wm.idl b/chrome/common/extensions/api/experimental_wm.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8dcab59db61fad1e82de2fd3a2f59158fa68dde3 |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/experimental_wm.idl |
| @@ -0,0 +1,66 @@ |
| +// 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. |
| + |
| +// Window management API. |
| + |
| +namespace experimental.wm { |
| + enum WindowType { |
| + modal, |
| + normal, |
| + panel |
| + }; |
| + |
| + enum WindowState { |
| + normal, |
| + minimized, |
| + maximized, |
| + fullscreen |
| + }; |
| + |
| + // The position and size of windows in screen coordinates. |
| + dictionary Bounds { |
| + long x; |
| + long y; |
| + long width; |
| + long height; |
| + }; |
| + |
| + dictionary WmWindow { |
|
Aaron Boodman
2012/08/21 21:13:43
s/Wm//
|
| + // A unique identifier for the window during the lifetime of the session. |
| + long id; |
| + |
| + // Window type and state. |
| + WindowType type; |
| + WindowState state; |
| + |
| + // The user-visible title of the window. This can be empty. |
| + DOMString title; |
| + |
| + // The location and size of the window. The location is in screen |
| + // coordinates. |
| + Bounds bounds; |
| + |
| + // At most one window can be active at a time. |
| + boolean active; |
| + }; |
| + |
| + interface Events { |
| + // This is triggered immediately after a window is created, but before it is |
| + // displayed. |
| + static void onWindowCreated(WmWindow window); |
| + |
| + // This is triggered whenever the window is closed (i.e. by the user, by |
| + // the web-page, or by the WM app from the close API call). |
| + static void onWindowClosed(WmWindow window); |
| + |
| + // This is triggered when a window is hidden. |
| + static void onWindowHidden(WmWindow window); |
| + |
| + // This is triggered when a window is made visible. |
| + static void onWindowShown(WmWindow window); |
| + |
| + // This is triggered when a new window becomes active. |
| + static void onActiveWindowChanged(WmWindow window); |
| + }; |
| +}; |