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 namespace app.window { | 5 namespace app.window { | 
| 6 dictionary CreateWindowOptions { | 6 dictionary CreateWindowOptions { | 
| 7 // Id to identify the window. This will be used to remember the size | 7 // Id to identify the window. This will be used to remember the size | 
| 8 // and position of the window and restore that geometry when a window | 8 // and position of the window and restore that geometry when a window | 
| 9 // with the same id (and no explicit size or position) is later opened. | 9 // with the same id (and no explicit size or position) is later opened. | 
| 10 DOMString? id; | 10 DOMString? id; | 
| 11 | 11 | 
| 12 // Default width of the window. | |
| 13 long? defaultWidth; | |
| 14 | |
| 15 // Default height of the window. | |
| 16 long? defaultHeight; | |
| 17 | |
| 18 // Default X coordinate of the window. | |
| 19 long? defaultLeft; | |
| 20 | |
| 21 // Default Y coordinate of the window. | |
| 22 long? defaultTop; | |
| 23 | |
| 24 // Width of the window. | 12 // Width of the window. | 
| 25 long? width; | 13 long? width; | 
| 26 | 14 | 
| 27 // Height of the window. | 15 // Height of the window. | 
| 28 long? height; | 16 long? height; | 
| 29 | 17 | 
| 30 // X coordinate of the window. | 18 // X coordinate of the window. | 
| 31 long? left; | 19 long? left; | 
| 32 | 20 | 
| 33 // Y coordinate of the window. | 21 // Y coordinate of the window. | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 // all, in which case a default size and platform dependent position will | 91 // all, in which case a default size and platform dependent position will | 
| 104 // be used. | 92 // be used. | 
| 105 // | 93 // | 
| 106 // Another option is to use the top/left and width/height properties, | 94 // Another option is to use the top/left and width/height properties, | 
| 107 // which will always put the window at the specified coordinates with the | 95 // which will always put the window at the specified coordinates with the | 
| 108 // specified size. | 96 // specified size. | 
| 109 // | 97 // | 
| 110 // Yet another option is to give the window a (unique) id. This id is then | 98 // Yet another option is to give the window a (unique) id. This id is then | 
| 111 // used to remember the size and position of the window whenever it is | 99 // used to remember the size and position of the window whenever it is | 
| 112 // moved or resized. This size and position is then used on subsequent | 100 // moved or resized. This size and position is then used on subsequent | 
| 113 // opening of a window with the same id. The defaultLeft/defaultTop and | 101 // opening of a window with the same id. The defaultLeft/defaultTop and | 
| 
 
koz (OOO until 15th September)
2012/11/12 22:29:32
This comment looks like it needs updating. Maybe m
 
 | |
| 114 // defaultWidth/defaultHeight properties can be used to specify a position | 102 // defaultWidth/defaultHeight properties can be used to specify a position | 
| 115 // and size when no geometry has been stored for the window yet. | 103 // and size when no geometry has been stored for the window yet. | 
| 116 // | 104 // | 
| 117 // You can also combine these various options, explicitly specifying for | 105 // You can also combine these various options, explicitly specifying for | 
| 118 // example the size while having the position be remembered or other | 106 // example the size while having the position be remembered or other | 
| 119 // combinations like that. Size and position are dealt with seperately, | 107 // combinations like that. Size and position are dealt with seperately, | 
| 120 // but individual coordinates are not. So if you specify a top (or left) | 108 // but individual coordinates are not. So if you specify a top (or left) | 
| 121 // coordinate, you should also specify a left (or top) coordinate, and | 109 // coordinate, you should also specify a left (or top) coordinate, and | 
| 122 // similar for size. | 110 // similar for size. | 
| 123 // | 111 // | 
| 124 // If you specify both a regular and a default value for the same option | 112 // If you specify both a regular and a default value for the same option | 
| 125 // the regular value is the only one that takes effect. | 113 // the regular value is the only one that takes effect. | 
| 126 static void create(DOMString url, | 114 static void create(DOMString url, | 
| 127 optional CreateWindowOptions options, | 115 optional CreateWindowOptions options, | 
| 128 optional CreateWindowCallback callback); | 116 optional CreateWindowCallback callback); | 
| 129 | 117 | 
| 130 [nocompile] static AppWindow current(); | 118 [nocompile] static AppWindow current(); | 
| 131 [nocompile, nodoc] static void initializeAppWindow(object state); | 119 [nocompile, nodoc] static void initializeAppWindow(object state); | 
| 132 }; | 120 }; | 
| 133 }; | 121 }; | 
| OLD | NEW |