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

Side by Side Diff: client/fling/src/dart/fling.dart

Issue 9314025: Remove fling, deftserver (used only by fling), and commons-codec (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/fling/samples/two_servers.dart ('k') | client/fling/src/dart/fling.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 class Fling {
6 static void goForth() native;
7 static void refresh() native;
8 static String getInstallPath() native;
9 }
10
11
12 typedef void HttpRequestHandler(HttpRequest req, HttpResponse res);
13
14
15 class HttpResponse {
16 HttpResponse._internal() {}
17 void finish() native;
18 void flush() native;
19 void setHeader(String name, String value) native;
20 void setStatusCode(int code) native;
21 void write(String data) native;
22 static HttpResponse _create() native {
23 return new HttpResponse._internal();
24 }
25 }
26
27
28 class HttpRequest {
29 HttpRequest._internal() {}
30 static HttpRequest _create() native {
31 return new HttpRequest._internal();
32 }
33 String get body() native;
34 bool get isKeepAlive() native;
35 String get method() native;
36 String get requestedPath() native;
37 String get version() native;
38 String get prefix() native;
39 }
40
41
42 class HttpServer {
43 HttpServer() {
44 _init();
45 }
46 void handle(String path, HttpRequestHandler handler) native;
47 void listen(int port) native;
48 void _init() native;
49 }
50
51
52 class ClientApp {
53 ClientApp(String path, [List<String> staticApps = null]) {
54 _init(path, staticApps);
55 }
56
57 static HttpRequestHandler create(String path, [List<String> staticApps = null] ) {
58 return new ClientApp(path, staticApps).handler;
59 }
60
61 HttpRequestHandler get handler() {
62 return ((HttpRequest req, HttpResponse res) { return _handle(req, res); });
63 }
64
65 void _handle(HttpRequest req, HttpResponse res) native;
66 void _init(String path, List<String> staticApps) native;
67 }
OLDNEW
« no previous file with comments | « client/fling/samples/two_servers.dart ('k') | client/fling/src/dart/fling.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698