Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: tools/dom/src/chrome/app_window.dart

Issue 12316032: Added more Chrome.* libraries to dart:chrome (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed local hardcoded paths Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/src/chrome/app_runtime.dart ('k') | tools/dom/src/chrome/bluetooth.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Generated from namespace: app.window 5 // Generated from namespace: app.window
6 6
7 part of chrome; 7 part of chrome;
8 8
9 /** 9 /**
10 * Types 10 * Types
11 */ 11 */
12 12
13 class AppWindowBounds extends ChromeObject {
14 /*
15 * Public constructor
16 */
17 AppWindowBounds({int left, int top, int width, int height}) {
18 if (?left)
19 this.left = left;
20 if (?top)
21 this.top = top;
22 if (?width)
23 this.width = width;
24 if (?height)
25 this.height = height;
26 }
27
28 /*
29 * Private constructor
30 */
31 AppWindowBounds._proxy(_jsObject) : super._proxy(_jsObject);
32
33 /*
34 * Public accessors
35 */
36 int get left => JS('int', '#.left', this._jsObject);
37
38 void set left(int left) {
39 JS('void', '#.left = #', this._jsObject, left);
40 }
41
42 int get top => JS('int', '#.top', this._jsObject);
43
44 void set top(int top) {
45 JS('void', '#.top = #', this._jsObject, top);
46 }
47
48 int get width => JS('int', '#.width', this._jsObject);
49
50 void set width(int width) {
51 JS('void', '#.width = #', this._jsObject, width);
52 }
53
54 int get height => JS('int', '#.height', this._jsObject);
55
56 void set height(int height) {
57 JS('void', '#.height = #', this._jsObject, height);
58 }
59
60 }
61
13 class AppWindowCreateWindowOptions extends ChromeObject { 62 class AppWindowCreateWindowOptions extends ChromeObject {
14 /* 63 /*
15 * Public constructor 64 * Public constructor
16 */ 65 */
17 AppWindowCreateWindowOptions({String id, int defaultWidth, int defaultHeight, int defaultLeft, int defaultTop, int width, int height, int left, int top, int m inWidth, int minHeight, int maxWidth, int maxHeight, String type, String frame, AppWindowBounds bounds, bool transparentBackground, bool hidden, bool singleton} ) { 66 AppWindowCreateWindowOptions({String id, int defaultWidth, int defaultHeight, int defaultLeft, int defaultTop, int width, int height, int left, int top, int m inWidth, int minHeight, int maxWidth, int maxHeight, String type, String frame, AppWindowBounds bounds, bool transparentBackground, bool hidden, bool singleton} ) {
18 if (?id) 67 if (?id)
19 this.id = id; 68 this.id = id;
20 if (?defaultWidth) 69 if (?defaultWidth)
21 this.defaultWidth = defaultWidth; 70 this.defaultWidth = defaultWidth;
22 if (?defaultHeight) 71 if (?defaultHeight)
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 /// you do want to create multiple windows with the same id, you can set this 255 /// you do want to create multiple windows with the same id, you can set this
207 /// property to false. 256 /// property to false.
208 bool get singleton => JS('bool', '#.singleton', this._jsObject); 257 bool get singleton => JS('bool', '#.singleton', this._jsObject);
209 258
210 void set singleton(bool singleton) { 259 void set singleton(bool singleton) {
211 JS('void', '#.singleton = #', this._jsObject, singleton); 260 JS('void', '#.singleton = #', this._jsObject, singleton);
212 } 261 }
213 262
214 } 263 }
215 264
216 class AppWindowBounds extends ChromeObject {
217 /*
218 * Public constructor
219 */
220 AppWindowBounds({int left, int top, int width, int height}) {
221 if (?left)
222 this.left = left;
223 if (?top)
224 this.top = top;
225 if (?width)
226 this.width = width;
227 if (?height)
228 this.height = height;
229 }
230
231 /*
232 * Private constructor
233 */
234 AppWindowBounds._proxy(_jsObject) : super._proxy(_jsObject);
235
236 /*
237 * Public accessors
238 */
239 int get left => JS('int', '#.left', this._jsObject);
240
241 void set left(int left) {
242 JS('void', '#.left = #', this._jsObject, left);
243 }
244
245 int get top => JS('int', '#.top', this._jsObject);
246
247 void set top(int top) {
248 JS('void', '#.top = #', this._jsObject, top);
249 }
250
251 int get width => JS('int', '#.width', this._jsObject);
252
253 void set width(int width) {
254 JS('void', '#.width = #', this._jsObject, width);
255 }
256
257 int get height => JS('int', '#.height', this._jsObject);
258
259 void set height(int height) {
260 JS('void', '#.height = #', this._jsObject, height);
261 }
262
263 }
264
265 class AppWindowAppWindow extends ChromeObject { 265 class AppWindowAppWindow extends ChromeObject {
266 /* 266 /*
267 * Private constructor 267 * Private constructor
268 */ 268 */
269 AppWindowAppWindow._proxy(_jsObject) : super._proxy(_jsObject); 269 AppWindowAppWindow._proxy(_jsObject) : super._proxy(_jsObject);
270 270
271 /* 271 /*
272 * Public accessors 272 * Public accessors
273 */ 273 */
274 /// The JavaScript 'window' object for the created child. 274 /// The JavaScript 'window' object for the created child.
275 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 275 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
276 // for details. All rights reserved. Use of this source code is governed by a 276 // for details. All rights reserved. Use of this source code is governed by a
277 // BSD-style license that can be found in the LICENSE file. 277 // BSD-style license that can be found in the LICENSE file.
278 278
279 // TODO(sashab, sra): Detect whether this is the current window, or an 279 // TODO(sashab, sra): Detect whether this is the current window, or an
280 // external one, and return an appropriately-typed object 280 // external one, and return an appropriately-typed object
281 WindowBase get contentWindow => 281 WindowBase get contentWindow =>
282 JS("Window", "#.contentWindow", this._jsObject); 282 JS("Window", "#.contentWindow", this._jsObject);
283 283
284 /* 284 /*
285 * Methods 285 * Methods
286 */ 286 */
287 /// Focus the window. 287 /// Focus the window.
288 void focus() => JS('void', '#.focus()', this._jsObject); 288 void focus() => JS('void', '#.focus()', this._jsObject);
289 289
290 /// Minimize the window. 290 /// Minimize the window.
291 void minimize() => JS('void', '#.minimize()', this._jsObject); 291 void minimize() => JS('void', '#.minimize()', this._jsObject);
292 292
293 /// Is the window minimized? 293 /// Is the window minimized?
294 void isMinimized() => JS('void', '#.isMinimized()', this._jsObject); 294 bool isMinimized() => JS('bool', '#.isMinimized()', this._jsObject);
295 295
296 /// Maximize the window. 296 /// Maximize the window.
297 void maximize() => JS('void', '#.maximize()', this._jsObject); 297 void maximize() => JS('void', '#.maximize()', this._jsObject);
298 298
299 /// Is the window maximized? 299 /// Is the window maximized?
300 void isMaximized() => JS('void', '#.isMaximized()', this._jsObject); 300 bool isMaximized() => new bool._proxy(JS('', '#.isMaximized()', this._jsObject ));
sashab 2013/02/21 03:22:18 So, this is an interesting case. Apparently "bool"
301 301
302 /// Restore the window. 302 /// Restore the window.
303 void restore() => JS('void', '#.restore()', this._jsObject); 303 void restore() => JS('void', '#.restore()', this._jsObject);
304 304
305 /// Move the window to the position (|left|, |top|). 305 /// Move the window to the position (|left|, |top|).
306 void moveTo(int left, int top) => JS('void', '#.moveTo(#, #)', this._jsObject, left, top); 306 void moveTo(int left, int top) => JS('void', '#.moveTo(#, #)', this._jsObject, left, top);
307 307
308 /// Resize the window to |width|x|height| pixels in size. 308 /// Resize the window to |width|x|height| pixels in size.
309 void resizeTo(int width, int height) => JS('void', '#.resizeTo(#, #)', this._j sObject, width, height); 309 void resizeTo(int width, int height) => JS('void', '#.resizeTo(#, #)', this._j sObject, width, height);
310 310
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 void initializeAppWindow(Object state) => JS('void', '#.initializeAppWindow(#) ', this._jsObject, convertArgument(state)); 475 void initializeAppWindow(Object state) => JS('void', '#.initializeAppWindow(#) ', this._jsObject, convertArgument(state));
476 476
477 API_app_window(this._jsObject) { 477 API_app_window(this._jsObject) {
478 onBoundsChanged = new Event_app_window_onBoundsChanged(JS('', '#.onBoundsCha nged', this._jsObject)); 478 onBoundsChanged = new Event_app_window_onBoundsChanged(JS('', '#.onBoundsCha nged', this._jsObject));
479 onClosed = new Event_app_window_onClosed(JS('', '#.onClosed', this._jsObject )); 479 onClosed = new Event_app_window_onClosed(JS('', '#.onClosed', this._jsObject ));
480 onMaximized = new Event_app_window_onMaximized(JS('', '#.onMaximized', this. _jsObject)); 480 onMaximized = new Event_app_window_onMaximized(JS('', '#.onMaximized', this. _jsObject));
481 onMinimized = new Event_app_window_onMinimized(JS('', '#.onMinimized', this. _jsObject)); 481 onMinimized = new Event_app_window_onMinimized(JS('', '#.onMinimized', this. _jsObject));
482 onRestored = new Event_app_window_onRestored(JS('', '#.onRestored', this._js Object)); 482 onRestored = new Event_app_window_onRestored(JS('', '#.onRestored', this._js Object));
483 } 483 }
484 } 484 }
OLDNEW
« no previous file with comments | « tools/dom/src/chrome/app_runtime.dart ('k') | tools/dom/src/chrome/bluetooth.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698