| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module mojo; | 5 module mojo; |
| 6 | 6 |
| 7 // TODO(jam): interface for http_server | 7 import "services/http_server/public/http_request.mojom"; |
| 8 import "services/http_server/public/http_response.mojom"; |
| 9 |
| 10 [Client=HttpServerClient] |
| 11 interface HttpServerService { |
| 12 // Add a handler for the given regex path. |
| 13 AddHandler(string path) => (bool success); |
| 14 |
| 15 // Remove a previously registered handler. |
| 16 RemoveHandler(string path) => (bool success); |
| 17 }; |
| 18 |
| 19 interface HttpServerClient { |
| 20 OnHandleRequest(HttpRequest request) => (HttpResponse response); |
| 21 }; |
| OLD | NEW |