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

Side by Side Diff: samples/isolate_html/IsolateSample.dart

Issue 9382027: Move client/{base, observable, layout, touch, util, view} to samples/ui_lib . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 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 | « client/view/view.dart ('k') | samples/isolate_html/isolate_sample.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * These are the messages we are going to send to the isolates 6 * These are the messages we are going to send to the isolates
7 * that we create. 7 * that we create.
8 */ 8 */
9 class MessageId { 9 class MessageId {
10 static final INIT = "init"; 10 static final INIT = "init";
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 }); 77 });
78 }); 78 });
79 } 79 }
80 80
81 chirpPort.receive((var message, SendPort replyTo) { 81 chirpPort.receive((var message, SendPort replyTo) {
82 replyElement.text = message; 82 replyElement.text = message;
83 }); 83 });
84 } 84 }
85 85
86 static void main() { 86 static void main() {
87 Dom.ready(void _() { new IsolateSample().ready(); }); 87 new IsolateSample().ready();
88 } 88 }
89 89
90 // TODO(mattsh) get this off the System object once it's available 90 // TODO(mattsh) get this off the System object once it's available
91 // see http://b/issue?id=5215916 91 // see http://b/issue?id=5215916
92 static bool isVm() { 92 static bool isVm() {
93 return 1234567890123456789 % 2 > 0; 93 return 1234567890123456789 % 2 > 0;
94 } 94 }
95 } 95 }
96 96
97 /** 97 /**
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 "received message: <span class='messageText'>'${message}'</span>"; 145 "received message: <span class='messageText'>'${message}'</span>";
146 if (div.query(".replyCheckbox").dynamic.checked) { 146 if (div.query(".replyCheckbox").dynamic.checked) {
147 InputElement element = div.query(".delayTextbox"); 147 InputElement element = div.query(".delayTextbox");
148 int millis = Math.parseInt(element.value); 148 int millis = Math.parseInt(element.value);
149 window.setTimeout(() { 149 window.setTimeout(() {
150 replyTo.send("this is a reply from isolate '${isolateName}'", null); 150 replyTo.send("this is a reply from isolate '${isolateName}'", null);
151 }, millis); 151 }, millis);
152 } 152 }
153 } 153 }
154 } 154 }
OLDNEW
« no previous file with comments | « client/view/view.dart ('k') | samples/isolate_html/isolate_sample.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698