Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 // Window management API. | |
| 6 | |
| 7 namespace experimental.wm { | |
| 8 enum WindowType { | |
| 9 modal, | |
| 10 normal, | |
| 11 panel | |
| 12 }; | |
| 13 | |
| 14 enum WindowState { | |
| 15 normal, | |
| 16 minimized, | |
| 17 maximized, | |
| 18 fullscreen | |
| 19 }; | |
| 20 | |
| 21 // The position and size of windows in screen coordinates. | |
| 22 dictionary Bounds { | |
| 23 long x; | |
| 24 long y; | |
| 25 long width; | |
| 26 long height; | |
| 27 }; | |
| 28 | |
| 29 dictionary WmWindow { | |
|
Aaron Boodman
2012/08/21 21:13:43
s/Wm//
| |
| 30 // A unique identifier for the window during the lifetime of the session. | |
| 31 long id; | |
| 32 | |
| 33 // Window type and state. | |
| 34 WindowType type; | |
| 35 WindowState state; | |
| 36 | |
| 37 // The user-visible title of the window. This can be empty. | |
| 38 DOMString title; | |
| 39 | |
| 40 // The location and size of the window. The location is in screen | |
| 41 // coordinates. | |
| 42 Bounds bounds; | |
| 43 | |
| 44 // At most one window can be active at a time. | |
| 45 boolean active; | |
| 46 }; | |
| 47 | |
| 48 interface Events { | |
| 49 // This is triggered immediately after a window is created, but before it is | |
| 50 // displayed. | |
| 51 static void onWindowCreated(WmWindow window); | |
| 52 | |
| 53 // This is triggered whenever the window is closed (i.e. by the user, by | |
| 54 // the web-page, or by the WM app from the close API call). | |
| 55 static void onWindowClosed(WmWindow window); | |
| 56 | |
| 57 // This is triggered when a window is hidden. | |
| 58 static void onWindowHidden(WmWindow window); | |
| 59 | |
| 60 // This is triggered when a window is made visible. | |
| 61 static void onWindowShown(WmWindow window); | |
| 62 | |
| 63 // This is triggered when a new window becomes active. | |
| 64 static void onActiveWindowChanged(WmWindow window); | |
| 65 }; | |
| 66 }; | |
| OLD | NEW |