OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package main | 5 package main |
6 | 6 |
7 import ( | 7 import ( |
8 "fmt" | 8 "fmt" |
9 "log" | 9 "log" |
10 | 10 |
11 "golang.org/x/mobile/app" | |
12 | |
13 "mojo/public/go/application" | 11 "mojo/public/go/application" |
14 "mojo/public/go/bindings" | 12 "mojo/public/go/bindings" |
15 "mojo/public/go/system" | 13 "mojo/public/go/system" |
16 | 14 |
17 "mojo/services/http_server/public/interfaces/http_request" | 15 "mojo/services/http_server/public/interfaces/http_request" |
18 "mojo/services/http_server/public/interfaces/http_response" | 16 "mojo/services/http_server/public/interfaces/http_response" |
19 "mojo/services/http_server/public/interfaces/http_server" | 17 "mojo/services/http_server/public/interfaces/http_server" |
20 "mojo/services/http_server/public/interfaces/http_server_factory" | 18 "mojo/services/http_server/public/interfaces/http_server_factory" |
21 "mojo/services/network/public/interfaces/net_address" | 19 "mojo/services/network/public/interfaces/net_address" |
22 ) | 20 ) |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 d.handlerStub.Close() | 95 d.handlerStub.Close() |
98 } | 96 } |
99 | 97 |
100 //export MojoMain | 98 //export MojoMain |
101 func MojoMain(handle C.MojoHandle) C.MojoResult { | 99 func MojoMain(handle C.MojoHandle) C.MojoResult { |
102 application.Run(&HttpHandlerDelegate{}, system.MojoHandle(handle)) | 100 application.Run(&HttpHandlerDelegate{}, system.MojoHandle(handle)) |
103 return C.MOJO_RESULT_OK | 101 return C.MOJO_RESULT_OK |
104 } | 102 } |
105 | 103 |
106 func main() { | 104 func main() { |
107 app.Run(app.Callbacks{}) | |
108 } | 105 } |
OLD | NEW |