Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // File-level comment to appease parser. Eventually this will not be necessary. | 5 // File-level comment to appease parser. Eventually this will not be necessary. |
| 6 | 6 |
| 7 namespace app.window { | 7 namespace app.window { |
| 8 dictionary CreateWindowOptions { | 8 dictionary CreateWindowOptions { |
| 9 // Width of the window. | 9 // Width of the window. |
| 10 long? width; | 10 long? width; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 long? maxHeight; | 31 long? maxHeight; |
| 32 | 32 |
| 33 // Window type: 'shell' (the default) is the only currently supported value. | 33 // Window type: 'shell' (the default) is the only currently supported value. |
| 34 DOMString? type; | 34 DOMString? type; |
| 35 | 35 |
| 36 // Frame type: 'none' or 'chrome' (defaults to 'chrome'). | 36 // Frame type: 'none' or 'chrome' (defaults to 'chrome'). |
| 37 DOMString? frame; | 37 DOMString? frame; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 callback CreateWindowCallback = | 40 callback CreateWindowCallback = |
| 41 void ([instanceOf=global] object created_window); | 41 void ([instanceOf=global] object created_window); |
|
Mihai Parparita -not on Chrome
2012/08/27 23:21:06
Shouldn't the created_window type now be AppWindow
jeremya
2012/08/30 02:38:54
Done.
| |
| 42 | 42 |
| 43 dictionary AppWindow { | |
|
Mihai Parparita -not on Chrome
2012/08/27 23:21:06
Document the .dom property too.
jeremya
2012/08/30 02:38:54
Done.
| |
| 44 // Focus the window. | |
| 45 static void focus(); | |
| 46 | |
| 47 // Minimize the window. | |
| 48 static void minimize(); | |
| 49 | |
| 50 // Maximize the window. | |
| 51 static void maximize(); | |
| 52 | |
| 53 // Restore the window. | |
| 54 static void restore(); | |
| 55 | |
| 56 // Move the window to the position (|x|, |y|). | |
| 57 static void moveTo(long x, long y); | |
| 58 | |
| 59 // Move the window to the position (|x|, |y|). | |
| 60 static void resizeTo(long x, long y); | |
| 61 }; | |
| 62 | |
| 43 interface Functions { | 63 interface Functions { |
| 44 static void create(DOMString url, | 64 static void create(DOMString url, |
| 45 optional CreateWindowOptions options, | 65 optional CreateWindowOptions options, |
| 46 optional CreateWindowCallback callback); | 66 optional CreateWindowCallback callback); |
| 47 | 67 |
| 48 static void focus(); | 68 [nocompile] static AppWindow current(); |
| 49 static void maximize(); | |
| 50 static void minimize(); | |
| 51 static void restore(); | |
| 52 [nocompile] static void moveTo(long x, long y); | |
| 53 [nocompile] static void resizeTo(long width, long height); | |
| 54 }; | 69 }; |
| 55 }; | 70 }; |
| OLD | NEW |