OLD | NEW |
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.runtime | 5 // Generated from namespace: app.runtime |
6 | 6 |
7 part of chrome; | 7 part of chrome; |
8 | 8 |
9 /** | 9 /** |
10 * Types | 10 * Types |
(...skipping 14 matching lines...) Expand all Loading... |
25 * Private constructor | 25 * Private constructor |
26 */ | 26 */ |
27 AppRuntimeLaunchItem._proxy(_jsObject) : super._proxy(_jsObject); | 27 AppRuntimeLaunchItem._proxy(_jsObject) : super._proxy(_jsObject); |
28 | 28 |
29 /* | 29 /* |
30 * Public accessors | 30 * Public accessors |
31 */ | 31 */ |
32 /// FileEntry for the file. | 32 /// FileEntry for the file. |
33 FileEntry get entry => JS('FileEntry', '#.entry', this._jsObject); | 33 FileEntry get entry => JS('FileEntry', '#.entry', this._jsObject); |
34 | 34 |
35 set entry(FileEntry entry) { | 35 void set entry(FileEntry entry) { |
36 JS('void', '#.entry = #', this._jsObject, convertArgument(entry)); | 36 JS('void', '#.entry = #', this._jsObject, convertArgument(entry)); |
37 } | 37 } |
38 | 38 |
39 /// The MIME type of the file. | 39 /// The MIME type of the file. |
40 String get type => JS('String', '#.type', this._jsObject); | 40 String get type => JS('String', '#.type', this._jsObject); |
41 | 41 |
42 set type(String type) { | 42 void set type(String type) { |
43 JS('void', '#.type = #', this._jsObject, type); | 43 JS('void', '#.type = #', this._jsObject, type); |
44 } | 44 } |
45 | 45 |
46 } | 46 } |
47 | 47 |
48 class AppRuntimeLaunchData extends ChromeObject { | 48 class AppRuntimeLaunchData extends ChromeObject { |
49 /* | 49 /* |
50 * Public constructor | 50 * Public constructor |
51 */ | 51 */ |
52 AppRuntimeLaunchData({String id, List<AppRuntimeLaunchItem> items}) { | 52 AppRuntimeLaunchData({String id, List<AppRuntimeLaunchItem> items}) { |
53 if (id != null) | 53 if (id != null) |
54 this.id = id; | 54 this.id = id; |
55 if (items != null) | 55 if (items != null) |
56 this.items = items; | 56 this.items = items; |
57 } | 57 } |
58 | 58 |
59 /* | 59 /* |
60 * Private constructor | 60 * Private constructor |
61 */ | 61 */ |
62 AppRuntimeLaunchData._proxy(_jsObject) : super._proxy(_jsObject); | 62 AppRuntimeLaunchData._proxy(_jsObject) : super._proxy(_jsObject); |
63 | 63 |
64 /* | 64 /* |
65 * Public accessors | 65 * Public accessors |
66 */ | 66 */ |
67 /// The id of the file handler that the app is being invoked with. | 67 /// The id of the file handler that the app is being invoked with. |
68 String get id => JS('String', '#.id', this._jsObject); | 68 String get id => JS('String', '#.id', this._jsObject); |
69 | 69 |
70 set id(String id) { | 70 void set id(String id) { |
71 JS('void', '#.id = #', this._jsObject, id); | 71 JS('void', '#.id = #', this._jsObject, id); |
72 } | 72 } |
73 | 73 |
74 List<AppRuntimeLaunchItem> get items { | 74 List<AppRuntimeLaunchItem> get items { |
75 List<AppRuntimeLaunchItem> __proxy_items = new List<AppRuntimeLaunchItem>(); | 75 List<AppRuntimeLaunchItem> __proxy_items = new List<AppRuntimeLaunchItem>(); |
76 int count = JS('int', '#.items.length', this._jsObject); | 76 int count = JS('int', '#.items.length', this._jsObject); |
77 for (int i = 0; i < count; i++) { | 77 for (int i = 0; i < count; i++) { |
78 var item = JS('', '#.items[#]', this._jsObject, i); | 78 var item = JS('', '#.items[#]', this._jsObject, i); |
79 __proxy_items.add(new AppRuntimeLaunchItem._proxy(item)); | 79 __proxy_items.add(new AppRuntimeLaunchItem._proxy(item)); |
80 } | 80 } |
81 return __proxy_items; | 81 return __proxy_items; |
82 } | 82 } |
83 | 83 |
84 set items(List<AppRuntimeLaunchItem> items) { | 84 void set items(List<AppRuntimeLaunchItem> items) { |
85 JS('void', '#.items = #', this._jsObject, convertArgument(items)); | 85 JS('void', '#.items = #', this._jsObject, convertArgument(items)); |
86 } | 86 } |
87 | 87 |
88 } | 88 } |
89 | 89 |
90 /** | 90 /** |
91 * Events | 91 * Events |
92 */ | 92 */ |
93 | 93 |
94 /// Fired when an app is launched from the launcher. | 94 /// Fired when an app is launched from the launcher. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 /* | 148 /* |
149 * Events | 149 * Events |
150 */ | 150 */ |
151 Event_app_runtime_onLaunched onLaunched; | 151 Event_app_runtime_onLaunched onLaunched; |
152 Event_app_runtime_onRestarted onRestarted; | 152 Event_app_runtime_onRestarted onRestarted; |
153 API_app_runtime(this._jsObject) { | 153 API_app_runtime(this._jsObject) { |
154 onLaunched = new Event_app_runtime_onLaunched(JS('', '#.onLaunched', this._j
sObject)); | 154 onLaunched = new Event_app_runtime_onLaunched(JS('', '#.onLaunched', this._j
sObject)); |
155 onRestarted = new Event_app_runtime_onRestarted(JS('', '#.onRestarted', this
._jsObject)); | 155 onRestarted = new Event_app_runtime_onRestarted(JS('', '#.onRestarted', this
._jsObject)); |
156 } | 156 } |
157 } | 157 } |
OLD | NEW |